{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import numpy as np\n",
    "from pandas.core.frame import DataFrame\n",
    "import time\n",
    "from geopy.distance import geodesic\n",
    "import warnings\n",
    "warnings.filterwarnings('ignore')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 1 测试集的trace去训练集里面寻找\n",
    "## 2根据第一条记录(真正的出发点去寻找)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "#港口坐标数据\n",
    "#港口坐标数据描述每个运单在船运的过程中涉及的港口位置信息。\n",
    "port=pd.read_csv('../event_port/port.csv')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'UF926856274385': ['OIEQNT', 'F3079930393'],\n",
       " 'JB328944608711': ['OIEQNT', 'F3079930393'],\n",
       " 'ZZ867367040038': ['OIEQNT', 'F3079930393'],\n",
       " 'UP677806636713': ['OIEQNT', 'Q2654292540'],\n",
       " 'VI587704318284': ['OIEQNT', 'Q2654292540'],\n",
       " 'PM403643849980': ['OIEQNT', 'Q2654292540'],\n",
       " 'JB448312963557': ['OIEQNT', 'Q2654292540'],\n",
       " 'US623681353740': ['OIEQNT', 'Q2654292540'],\n",
       " 'OU464404324541': ['OIEQNT', 'Q2654292540'],\n",
       " 'LE749249163337': ['OYSCFP', 'J1826969247'],\n",
       " 'AU265023696929': ['OYSCFP', 'J1826969247'],\n",
       " 'MY862052854541': ['BHSOUA', 'G2477503010'],\n",
       " 'QK316472242619': ['RWHZVZ', 'O7237582091'],\n",
       " 'FJ182986121226': ['RWHZVZ', 'V2180946969'],\n",
       " 'SY689544812125': ['FGPEPT', 'B6301205095'],\n",
       " 'ZT192067902461': ['FGPEPT', 'U6259111104'],\n",
       " 'FS560202408893': ['FGPEPT', 'U6259111104'],\n",
       " 'CD134363857493': ['BHSOUA', 'I1147779029'],\n",
       " 'WC269131531813': ['NWLGLX', 'T4057606472'],\n",
       " 'LC313603991551': ['VFUZBJ', 'P5384240793'],\n",
       " 'VP603942678454': ['RMZCAZ', 'H4719148138'],\n",
       " 'QP458574877364': ['JCMFTA', 'L7329364018'],\n",
       " 'LP548107435675': ['VFUZBJ', 'M9818812591'],\n",
       " 'BR517361902321': ['VFUZBJ', 'M9818812591'],\n",
       " 'KJ553632286209': ['OIEQNT', 'N8571946682'],\n",
       " 'ZN895559314183': ['UCQOQO', 'P6944255006'],\n",
       " 'BA787771232947': ['OIEQNT', 'L3511447447'],\n",
       " 'DJ285203919204': ['OIEQNT', 'L3511447447'],\n",
       " 'AN979077405077': ['OIEQNT', 'L3511447447'],\n",
       " 'DP560110914516': ['OIEQNT', 'L3511447447'],\n",
       " 'YV474879894820': ['OIEQNT', 'L3511447447'],\n",
       " 'AI277413217792': ['RWHZVZ', 'G5254548846'],\n",
       " 'UU643262515826': ['UCQOQO', 'D4815944938'],\n",
       " 'BD564400400986': ['RWHZVZ', 'P6347722228'],\n",
       " 'LZ488741474931': ['RWHZVZ', 'P6347722228'],\n",
       " 'QT604713221807': ['UCQOQO', 'E2731078511'],\n",
       " 'OY187702655816': ['UCQOQO', 'E2731078511'],\n",
       " 'TO969100585959': ['UCQOQO', 'E2731078511'],\n",
       " 'KB876035667349': ['JCMFTA', 'D4743112866'],\n",
       " 'TW641351217439': ['JCMFTA', 'D4743112866'],\n",
       " 'KJ784095196404': ['JCMFTA', 'D4743112866'],\n",
       " 'BL553990031891': ['JCMFTA', 'D4743112866'],\n",
       " 'BD594891859606': ['JCMFTA', 'D4743112866'],\n",
       " 'YZ380483227904': ['JCMFTA', 'D4743112866'],\n",
       " 'PB617796217699': ['JCMFTA', 'D4743112866'],\n",
       " 'TO147306181011': ['JCMFTA', 'D4743112866'],\n",
       " 'OR326878992805': ['JCMFTA', 'D4743112866'],\n",
       " 'VM477332641519': ['JCMFTA', 'D4743112866'],\n",
       " 'MU143341159054': ['JCMFTA', 'D4743112866'],\n",
       " 'HL223641326117': ['JCMFTA', 'D4743112866'],\n",
       " 'EE499317887365': ['JCMFTA', 'D4743112866'],\n",
       " 'PM978129831393': ['RWHZVZ', 'L7366395245'],\n",
       " 'DD574168581580': ['OYSCFP', 'M9045507485'],\n",
       " 'NW877117450989': ['OIEQNT', 'J5733630409'],\n",
       " 'SW928114342848': ['OIEQNT', 'J5733630409'],\n",
       " 'DE176203626016': ['KJIHXD', 'P4926649337'],\n",
       " 'JI713048770414': ['OYSCFP', 'P6932177891'],\n",
       " 'KB863307885821': ['KJIHXD', 'B3653869166'],\n",
       " 'TI314885714632': ['KJIHXD', 'B3653869166'],\n",
       " 'DQ326657059101': ['KJIHXD', 'B3653869166'],\n",
       " 'YN657553960595': ['KJIHXD', 'B3653869166'],\n",
       " 'YN762867648603': ['KJIHXD', 'B3653869166'],\n",
       " 'UQ565135047920': ['JCMFTA', 'Y2160414151'],\n",
       " 'GY741993711581': ['JCMFTA', 'Y2160414151'],\n",
       " 'TK927915891469': ['JCMFTA', 'Y2160414151'],\n",
       " 'BW956761574864': ['JCMFTA', 'Y2160414151'],\n",
       " 'DU815844209191': ['JCMFTA', 'Y2160414151'],\n",
       " 'PM491926334402': ['JCMFTA', 'F1438843788'],\n",
       " 'ZV675944326793': ['BHSOUA', 'Z7614714870'],\n",
       " 'GO520950099995': ['RWHZVZ', 'O7354004198'],\n",
       " 'AV436296854150': ['RWHZVZ', 'O7354004198'],\n",
       " 'OG318898271134': ['JCMFTA', 'P9156043235'],\n",
       " 'JK925654640015': ['JCMFTA', 'P9156043235'],\n",
       " 'JU610633615169': ['JCMFTA', 'P9156043235'],\n",
       " 'DU379274287633': ['JCMFTA', 'P9156043235'],\n",
       " 'FZ936539413690': ['JCMFTA', 'T8662369097'],\n",
       " 'SI326940615693': ['RWHZVZ', 'R3162653813'],\n",
       " 'AG513340111857': ['RWHZVZ', 'R3162653813'],\n",
       " 'UE661138656379': ['RWHZVZ', 'H2270458921'],\n",
       " 'DN567966774437': ['RWHZVZ', 'B9712715367'],\n",
       " 'RN430310738447': ['UCQOQO', 'D4815944938'],\n",
       " 'YQ273421338793': ['UCQOQO', 'D4815944938'],\n",
       " 'XC924961701963': ['UCQOQO', 'D4815944938'],\n",
       " 'BD833653714328': ['OIEQNT', 'W3092277315'],\n",
       " 'BQ543458792168': ['JCMFTA', 'H9650262418'],\n",
       " 'MG337534416779': ['UCQOQO', 'R9177551325'],\n",
       " 'JD525900073785': ['BHSOUA', 'S6524337977'],\n",
       " 'MS340627788678': ['BHSOUA', 'S6524337977'],\n",
       " 'LQ710304511871': ['FGPEPT', 'H5835332037'],\n",
       " 'IU508751964530': ['RWHZVZ', 'B6650920620'],\n",
       " 'NT637929134073': ['RWHZVZ', 'H9075096536'],\n",
       " 'VQ586561116340': ['BHSOUA', 'W6623236114'],\n",
       " 'AW125117993867': ['BHSOUA', 'W6623236114'],\n",
       " 'RS494055094781': ['OIEQNT', 'F3079930393'],\n",
       " 'BK603630433394': ['OYSCFP', 'T5329447198'],\n",
       " 'BU262734549544': ['OYSCFP', 'T5329447198'],\n",
       " 'BB525005398682': ['JCMFTA', 'D3035576364'],\n",
       " 'WX727403062517': ['RWHZVZ', 'F6889693461'],\n",
       " 'LO461000809239': ['JCMFTA', 'J4233809033'],\n",
       " 'EC129185882616': ['JCMFTA', 'J4233809033'],\n",
       " 'IP926349517360': ['JCMFTA', 'J4233809033'],\n",
       " 'VU471145306599': ['JCMFTA', 'J4233809033'],\n",
       " 'US892533305839': ['JCMFTA', 'J4233809033'],\n",
       " 'SK873863913054': ['JCMFTA', 'J4233809033'],\n",
       " 'JF673565676703': ['JCMFTA', 'J4233809033'],\n",
       " 'SR410209625780': ['JCMFTA', 'J4233809033'],\n",
       " 'QW569364064572': ['JCMFTA', 'J4233809033'],\n",
       " 'WJ852807160003': ['JCMFTA', 'J4233809033'],\n",
       " 'OJ697039478133': ['JCMFTA', 'J4233809033'],\n",
       " 'YZ282669541718': ['JCMFTA', 'J4233809033'],\n",
       " 'UC629559406334': ['JCMFTA', 'J4233809033'],\n",
       " 'HX427579923966': ['JCMFTA', 'J4233809033'],\n",
       " 'JJ531670372703': ['JCMFTA', 'J4233809033'],\n",
       " 'PD105244474983': ['JCMFTA', 'J4233809033'],\n",
       " 'YC743781609721': ['OIEQNT', 'N9475343113'],\n",
       " 'LI273053712880': ['VFUZBJ', 'J9566205199'],\n",
       " 'VO774783034840': ['UCQOQO', 'T3880930838'],\n",
       " 'XK785419735386': ['OYSCFP', 'I7411492671'],\n",
       " 'OK885523986145': ['OYSCFP', 'I7411492671'],\n",
       " 'GI681848311702': ['OYSCFP', 'I7411492671'],\n",
       " 'QW851100693449': ['OYSCFP', 'I7411492671'],\n",
       " 'JE372538758831': ['OYSCFP', 'I7411492671'],\n",
       " 'VN960253117059': ['OYSCFP', 'I7411492671'],\n",
       " 'JZ768444717724': ['OYSCFP', 'I7411492671'],\n",
       " 'FF506973358440': ['OYSCFP', 'I7411492671'],\n",
       " 'LA873642787597': ['OYSCFP', 'I7411492671'],\n",
       " 'ZH428315920108': ['OYSCFP', 'I7411492671'],\n",
       " 'GG278722697727': ['OYSCFP', 'I7411492671'],\n",
       " 'RI400939098462': ['OYSCFP', 'I7411492671'],\n",
       " 'RY219846615124': ['OYSCFP', 'I7411492671'],\n",
       " 'WZ444681661630': ['OYSCFP', 'I7411492671'],\n",
       " 'ZX147141498522': ['OYSCFP', 'I7411492671'],\n",
       " 'SO933342668323': ['OYSCFP', 'I7411492671'],\n",
       " 'HO299753960940': ['OYSCFP', 'I7411492671'],\n",
       " 'ZG185231793648': ['OYSCFP', 'I7411492671'],\n",
       " 'XY207627071713': ['OYSCFP', 'I7411492671'],\n",
       " 'GY837416856385': ['OYSCFP', 'I7411492671'],\n",
       " 'QO180569616110': ['OYSCFP', 'I7411492671'],\n",
       " 'RJ266943776469': ['OYSCFP', 'I7411492671'],\n",
       " 'NY742860056595': ['OYSCFP', 'I7411492671'],\n",
       " 'PZ365866393139': ['OYSCFP', 'I7411492671'],\n",
       " 'CJ768793344580': ['OYSCFP', 'I7411492671'],\n",
       " 'RT124926712932': ['OYSCFP', 'I7411492671'],\n",
       " 'DE424116726466': ['OYSCFP', 'I7411492671'],\n",
       " 'PH166484885344': ['OYSCFP', 'I7411492671'],\n",
       " 'OS543238797242': ['OYSCFP', 'I7411492671'],\n",
       " 'IE622648732146': ['OYSCFP', 'I7411492671'],\n",
       " 'ZM619663715429': ['OYSCFP', 'I7411492671'],\n",
       " 'YN616864228264': ['OYSCFP', 'I7411492671'],\n",
       " 'BA283204446513': ['OYSCFP', 'I7411492671'],\n",
       " 'VZ214627113499': ['OYSCFP', 'I7411492671'],\n",
       " 'VP480371113216': ['OYSCFP', 'I7411492671'],\n",
       " 'KW124012938152': ['OYSCFP', 'I7411492671'],\n",
       " 'GX816122976723': ['OYSCFP', 'I7411492671'],\n",
       " 'DE929106108354': ['OYSCFP', 'I7411492671'],\n",
       " 'KN620857665140': ['RWHZVZ', 'W3564411667'],\n",
       " 'LO895094366017': ['OIEQNT', 'E8197708075'],\n",
       " 'VK625900515720': ['OIEQNT', 'E8197708075'],\n",
       " 'OG958394169369': ['OIEQNT', 'E8197708075'],\n",
       " 'WD970375095029': ['OIEQNT', 'E8197708075'],\n",
       " 'MU615006314047': ['OIEQNT', 'E8197708075'],\n",
       " 'QW272477249483': ['OIEQNT', 'E8197708075'],\n",
       " 'LD412184750685': ['OYSCFP', 'Q6093967381'],\n",
       " 'KD506903072074': ['OYSCFP', 'Q6093967381'],\n",
       " 'OW135781332389': ['OYSCFP', 'Q6093967381'],\n",
       " 'DE351247127340': ['OYSCFP', 'M4201633832'],\n",
       " 'YV808171038319': ['OYSCFP', 'M4201633832'],\n",
       " 'VH867879412784': ['OYSCFP', 'M4201633832'],\n",
       " 'UE444783468735': ['OYSCFP', 'M4201633832'],\n",
       " 'YL816056692187': ['OYSCFP', 'M4201633832'],\n",
       " 'QF452438554567': ['OYSCFP', 'M4201633832'],\n",
       " 'YY892374300835': ['OYSCFP', 'M4201633832'],\n",
       " 'HU614730576326': ['OYSCFP', 'M4201633832'],\n",
       " 'IZ613843278932': ['OYSCFP', 'M4201633832'],\n",
       " 'FZ852609872025': ['OYSCFP', 'M4201633832'],\n",
       " 'LS326631383450': ['OYSCFP', 'M4201633832'],\n",
       " 'MU396386189014': ['OYSCFP', 'M4201633832'],\n",
       " 'SM474628794579': ['OYSCFP', 'M4201633832'],\n",
       " 'YM790182907205': ['OYSCFP', 'M4201633832'],\n",
       " 'QJ288682178427': ['OYSCFP', 'M4201633832'],\n",
       " 'DG439960110889': ['OYSCFP', 'M4201633832'],\n",
       " 'JR767852969726': ['OYSCFP', 'M4201633832'],\n",
       " 'ME592316641865': ['OYSCFP', 'M4201633832'],\n",
       " 'WX745598578683': ['OYSCFP', 'M4201633832'],\n",
       " 'GJ834141833118': ['OYSCFP', 'M4201633832'],\n",
       " 'EK176417745040': ['OYSCFP', 'M4201633832'],\n",
       " 'GO365200936264': ['OYSCFP', 'M4201633832'],\n",
       " 'DZ820390352506': ['OYSCFP', 'M4201633832'],\n",
       " 'TM692608674268': ['OYSCFP', 'M4201633832'],\n",
       " 'HL284741209891': ['OYSCFP', 'M4201633832'],\n",
       " 'GY302701203311': ['OYSCFP', 'M4201633832'],\n",
       " 'ZC845305654951': ['OYSCFP', 'M4201633832'],\n",
       " 'FV576255466222': ['OYSCFP', 'M4201633832'],\n",
       " 'CQ668748972737': ['OYSCFP', 'M4201633832'],\n",
       " 'MW317254614831': ['OYSCFP', 'M4201633832'],\n",
       " 'WN633439817025': ['OYSCFP', 'M4201633832'],\n",
       " 'WH640964272391': ['OYSCFP', 'M4201633832'],\n",
       " 'PC647666609023': ['KJIHXD', 'Z2113739465'],\n",
       " 'BY620992937205': ['KJIHXD', 'Z2113739465'],\n",
       " 'TO363488883832': ['KJIHXD', 'N2003219294'],\n",
       " 'UK942194681927': ['KJIHXD', 'Z2113739465'],\n",
       " 'NE284276414433': ['KJIHXD', 'Z2113739465'],\n",
       " 'ZT242348041407': ['KJIHXD', 'N2003219294'],\n",
       " 'MQ120584508779': ['KJIHXD', 'Z2113739465'],\n",
       " 'NH662799959396': ['KJIHXD', 'Z2113739465'],\n",
       " 'CD557844941766': ['UCQOQO', 'Y2592596851'],\n",
       " 'QG156157504337': ['RWHZVZ', 'U4753562346'],\n",
       " 'VT785475533077': ['RWHZVZ', 'U4753562346'],\n",
       " 'GS810772422675': ['RWHZVZ', 'U4753562346'],\n",
       " 'LW811418763303': ['OIEQNT', 'W4344799848'],\n",
       " 'JP149446998527': ['OYSCFP', 'O2359343197'],\n",
       " 'GQ954529188511': ['JCMFTA', 'S1577316116'],\n",
       " 'VN133096700004': ['JCMFTA', 'S1577316116'],\n",
       " 'OP906416326918': ['JCMFTA', 'S1577316116'],\n",
       " 'IF544594218933': ['JCMFTA', 'S1577316116'],\n",
       " 'QT618131299656': ['JCMFTA', 'S1577316116'],\n",
       " 'LO740380318840': ['JCMFTA', 'S1577316116'],\n",
       " 'TQ698632410967': ['VFUZBJ', 'T1740309911'],\n",
       " 'BH744234319629': ['VFUZBJ', 'T1740309911'],\n",
       " 'NY783458990444': ['VFUZBJ', 'T1740309911'],\n",
       " 'TF425889812982': ['OIEQNT', 'P9092052654'],\n",
       " 'GE830886847722': ['OIEQNT', 'S8886084284'],\n",
       " 'JE772412906472': ['VRFMKJ', 'I9967082931'],\n",
       " 'PZ804078152311': ['VRFMKJ', 'L2005995468'],\n",
       " 'ZG222168000157': ['VRFMKJ', 'L2005995468'],\n",
       " 'HG491261635743': ['RWHZVZ', 'H8252069220'],\n",
       " 'UB337675444494': ['RWHZVZ', 'O3945581852'],\n",
       " 'AC872462954823': ['OYSCFP', 'C5142108677'],\n",
       " 'MO245861651746': ['UCQOQO', 'D4815944938'],\n",
       " 'ZI538394526922': ['UCQOQO', 'H3465163368'],\n",
       " 'BU316088113505': ['UCQOQO', 'W8700671907'],\n",
       " 'JU916935297979': ['RWHZVZ', 'T8271384510'],\n",
       " 'KE983291204583': ['RWHZVZ', 'A2177695011'],\n",
       " 'WX621390303637': ['RWHZVZ', 'T8271384510'],\n",
       " 'LK937398544422': ['RWHZVZ', 'K7474785588'],\n",
       " 'UX133252155566': ['RWHZVZ', 'A2177695011'],\n",
       " 'EW957216755968': ['UCQOQO', 'Y8117387663'],\n",
       " 'MB195381472501': ['UCQOQO', 'Y8117387663'],\n",
       " 'YZ857291017755': ['RWHZVZ', 'Y1636273788'],\n",
       " 'FH832270537491': ['RWHZVZ', 'Y1636273788'],\n",
       " 'CE500468539620': ['RWHZVZ', 'D2814177934'],\n",
       " 'ST683126663983': ['UCQOQO', 'N7978137959'],\n",
       " 'VI756333166304': ['RWHZVZ', 'V3905665642'],\n",
       " 'XP886234370074': ['JCMFTA', 'G4998204708'],\n",
       " 'SY842646326852': ['BHSOUA', 'L9192317714'],\n",
       " 'VW405276347011': ['UCQOQO', 'L9192317714'],\n",
       " 'ZE534771721314': ['UCQOQO', 'L9192317714'],\n",
       " 'ZF229943210723': ['OYSCFP', 'Z5930396190'],\n",
       " 'OY163923893317': ['OYSCFP', 'Z5930396190'],\n",
       " 'EF217673292254': ['RWHZVZ', 'W2722004813'],\n",
       " 'CU874418253417': ['RWHZVZ', 'W2722004813'],\n",
       " 'PW128787648368': ['UCQOQO', 'F2499845003'],\n",
       " 'PF188790612802': ['OIEQNT', 'X3806214427'],\n",
       " 'SA278271342142': ['RWHZVZ', 'U1811493949'],\n",
       " 'BK515966423031': ['OYSCFP', 'V9296543816'],\n",
       " 'UO912302447851': ['OYSCFP', 'I1239497845'],\n",
       " 'FB604461967355': ['OYSCFP', 'I1239497845'],\n",
       " 'TM949198251301': ['OYSCFP', 'I1239497845'],\n",
       " 'UW214934491849': ['OYSCFP', 'I1239497845'],\n",
       " 'FL214146045304': ['OYSCFP', 'I1239497845'],\n",
       " 'XL874243497678': ['OYSCFP', 'I1239497845'],\n",
       " 'UF837426133833': ['OYSCFP', 'I1239497845'],\n",
       " 'LJ901612316852': ['OYSCFP', 'I1239497845'],\n",
       " 'GR138406900638': ['OYSCFP', 'I1239497845'],\n",
       " 'SG757498136628': ['OYSCFP', 'I1239497845'],\n",
       " 'NW231244838287': ['OYSCFP', 'I1239497845'],\n",
       " 'VX641854914308': ['OYSCFP', 'I1239497845'],\n",
       " 'XX286527438212': ['OYSCFP', 'I1239497845'],\n",
       " 'YD437457306408': ['OYSCFP', 'I1239497845'],\n",
       " 'TZ719669371561': ['OYSCFP', 'I1239497845'],\n",
       " 'UK920949036218': ['OYSCFP', 'I1239497845'],\n",
       " 'HA411854114553': ['OYSCFP', 'I1239497845'],\n",
       " 'UR539525025911': ['OYSCFP', 'I1239497845'],\n",
       " 'BF206772032946': ['OYSCFP', 'I1239497845'],\n",
       " 'TN483734674692': ['OYSCFP', 'I1239497845'],\n",
       " 'TU991871148729': ['OYSCFP', 'I1239497845'],\n",
       " 'JZ589016539805': ['OYSCFP', 'I1239497845'],\n",
       " 'HO794256561018': ['OYSCFP', 'I1239497845'],\n",
       " 'LK580861686413': ['OYSCFP', 'I1239497845'],\n",
       " 'YO356953351008': ['OYSCFP', 'I1239497845'],\n",
       " 'KB161306831848': ['OYSCFP', 'I1239497845'],\n",
       " 'EU386177107384': ['OYSCFP', 'I1239497845'],\n",
       " 'MY577552556791': ['OYSCFP', 'I1239497845'],\n",
       " 'IP292984654803': ['OYSCFP', 'I1239497845'],\n",
       " 'UK619082632979': ['OYSCFP', 'I1239497845'],\n",
       " 'QE985095452932': ['OYSCFP', 'I1239497845'],\n",
       " 'WR273232459002': ['OYSCFP', 'I1239497845'],\n",
       " 'TV573867989748': ['OYSCFP', 'I1239497845'],\n",
       " 'LE785153608544': ['OYSCFP', 'I1239497845'],\n",
       " 'MQ710686506684': ['OYSCFP', 'I1239497845'],\n",
       " 'RH983592590256': ['OYSCFP', 'I1239497845'],\n",
       " 'CC735640016906': ['OYSCFP', 'I1239497845'],\n",
       " 'XY448418263872': ['OYSCFP', 'I1239497845'],\n",
       " 'ZO325901548301': ['OYSCFP', 'I1239497845'],\n",
       " 'ZS282405743594': ['OYSCFP', 'I1239497845'],\n",
       " 'RM185213631349': ['OYSCFP', 'I1239497845'],\n",
       " 'QG388936971565': ['OYSCFP', 'I1239497845'],\n",
       " 'QS131739033698': ['OYSCFP', 'I1239497845'],\n",
       " 'TB151226803478': ['OYSCFP', 'I1239497845'],\n",
       " 'KT147408019888': ['OYSCFP', 'I1239497845'],\n",
       " 'EG960748485702': ['OYSCFP', 'I1239497845'],\n",
       " 'KA702674392986': ['OYSCFP', 'I1239497845'],\n",
       " 'FY886108585665': ['OIEQNT', 'E5362800385'],\n",
       " 'WW466792141190': ['OIEQNT', 'E5362800385'],\n",
       " 'BZ327880276589': ['RWHZVZ', 'A2177695011'],\n",
       " 'NJ203953775234': ['RWHZVZ', 'B4728395566'],\n",
       " 'EY935043193340': ['RWHZVZ', 'A2177695011'],\n",
       " 'WI676774215410': ['RWHZVZ', 'A2177695011'],\n",
       " 'BH928916647979': ['RWHZVZ', 'B4728395566'],\n",
       " 'WT302649539826': ['VRFMKJ', 'Q9664289951'],\n",
       " 'WK976823356748': ['VRFMKJ', 'Q9664289951'],\n",
       " 'IY469458453570': ['VRFMKJ', 'Q9664289951'],\n",
       " 'JT511421601250': ['VRFMKJ', 'Q9664289951'],\n",
       " 'GW715716122966': ['VRFMKJ', 'Q9664289951'],\n",
       " 'ZS690145091596': ['ATREQJ', 'E8843077070'],\n",
       " 'EI783202722667': ['ATREQJ', 'E8843077070'],\n",
       " 'RB105444956038': ['RWHZVZ', 'B6430331822'],\n",
       " 'TD731679207977': ['FGPEPT', 'H6283005126'],\n",
       " 'BY832566000088': ['RWHZVZ', 'I3721443265'],\n",
       " 'HX239169224387': ['OIEQNT', 'X3806214427'],\n",
       " 'EZ737347833616': ['OYSCFP', 'B4245051587'],\n",
       " 'OU425528376141': ['RWHZVZ', 'K8773647217'],\n",
       " 'NS799210329918': ['UCQOQO', 'Y3985765084'],\n",
       " 'TN149112350364': ['VFUZBJ', 'L5897986122'],\n",
       " 'CZ602940594214': ['OYSCFP', 'V6368012371'],\n",
       " 'BX954978327459': ['OYSCFP', 'U1360572347'],\n",
       " 'RM227772917506': ['BHSOUA', 'C2740363303'],\n",
       " 'WP479827418711': ['BHSOUA', 'C2740363303'],\n",
       " 'YF432923881822': ['BHSOUA', 'C2740363303'],\n",
       " 'AI101983760037': ['JCMFTA', 'F1438843788'],\n",
       " 'XA875066870886': ['JCMFTA', 'G3991924319'],\n",
       " 'TP235308299796': ['OYSCFP', 'T3791031591'],\n",
       " 'QU438318636708': ['OYSCFP', 'T3791031591'],\n",
       " 'RI793246535615': ['OYSCFP', 'T3791031591'],\n",
       " 'TW960551753459': ['OYSCFP', 'B7479192639'],\n",
       " 'OF405113102630': ['RWHZVZ', 'M3596349045'],\n",
       " 'PF945208290220': ['UCQOQO', 'K2191938378'],\n",
       " 'ZJ635278745143': ['UCQOQO', 'K2191938378'],\n",
       " 'OB935940004370': ['RWHZVZ', 'X2508768225'],\n",
       " 'PB330339380443': ['RWHZVZ', 'X2508768225'],\n",
       " 'EU879542569654': ['VRFMKJ', 'B6281987069'],\n",
       " 'ZQ464072113491': ['FGPEPT', 'G8140282065'],\n",
       " 'RZ321715965702': ['OIEQNT', 'J1826969247'],\n",
       " 'UZ994694469634': ['FGPEPT', 'S4626808797'],\n",
       " 'LX197978822803': ['JCMFTA', 'C7376020082'],\n",
       " 'KF747095155025': ['JCMFTA', 'C7376020082'],\n",
       " 'HM302385710947': ['OYSCFP', 'F4676005751'],\n",
       " 'JD229315786876': ['FGPEPT', 'Z8972740913'],\n",
       " 'PS898668113330': ['FGPEPT', 'Z8972740913'],\n",
       " 'QL924466678429': ['FGPEPT', 'Z8972740913'],\n",
       " 'MY550886115039': ['FGPEPT', 'Z8972740913'],\n",
       " 'NB109540761906': ['FGPEPT', 'Z8972740913'],\n",
       " 'HR883261393869': ['FGPEPT', 'Z8972740913'],\n",
       " 'OB453877733519': ['RWHZVZ', 'K5352492455'],\n",
       " 'WD921157660502': ['RWHZVZ', 'K5352492455'],\n",
       " 'KQ615773456001': ['FGPEPT', 'R6552613899'],\n",
       " 'OX545437200450': ['FGPEPT', 'R6552613899'],\n",
       " 'BF915936158789': ['JCMFTA', 'I2280052824'],\n",
       " 'FY193324196058': ['JCMFTA', 'I2280052824'],\n",
       " 'PD285955891031': ['JCMFTA', 'I2280052824'],\n",
       " 'LE926214272046': ['JCMFTA', 'I2280052824'],\n",
       " 'JQ471511852683': ['RWHZVZ', 'R2189260156'],\n",
       " 'VC502294268231': ['RWHZVZ', 'R2189260156'],\n",
       " 'DC246820574688': ['RWHZVZ', 'H9663809278'],\n",
       " 'SC148258980862': ['OIEQNT', 'B1768413096'],\n",
       " 'PD184291697183': ['OIEQNT', 'B1768413096'],\n",
       " 'LJ157996533836': ['RWHZVZ', 'W9755545523'],\n",
       " 'EC530178313678': ['RWHZVZ', 'I2527498576'],\n",
       " 'LT723474649921': ['RWHZVZ', 'I2527498576'],\n",
       " 'AL160285170587': ['RWHZVZ', 'A7207180118'],\n",
       " 'WU738058558247': ['VMUSFS', 'A3217937298'],\n",
       " 'DO212529230262': ['OYSCFP', 'O5334898996'],\n",
       " 'BU989519028237': ['OYSCFP', 'Q5902305767'],\n",
       " 'AU851161490058': ['OYSCFP', 'Q5902305767'],\n",
       " 'MI676666890052': ['UQCRKD', 'T1764005884'],\n",
       " 'BP330462397384': ['UQCRKD', 'T1764005884'],\n",
       " 'HY552140721058': ['UQCRKD', 'T1764005884'],\n",
       " 'OI241622356980': ['UQCRKD', 'T1764005884'],\n",
       " 'OA901680980761': ['OYSCFP', 'K8713173207'],\n",
       " 'WB521590670760': ['OYSCFP', 'W6590768175'],\n",
       " 'UW725575071041': ['OYSCFP', 'Z7715601678'],\n",
       " 'YL934136656837': ['OYSCFP', 'U6893844452'],\n",
       " 'PG390084878470': ['UCQOQO', 'D3744799380'],\n",
       " 'FG327985337980': ['UCQOQO', 'D3744799380'],\n",
       " 'CQ961324913509': ['OYSCFP', 'P1886909609'],\n",
       " 'CN906368143939': ['OYSCFP', 'P1886909609'],\n",
       " 'MG452234707917': ['JCMFTA', 'N6306110049'],\n",
       " 'MU135824287647': ['JONOCD', 'E8477346171'],\n",
       " 'PE175840129874': ['JCMFTA', 'K8238684103'],\n",
       " 'NJ987920211042': ['JCMFTA', 'K8238684103'],\n",
       " 'XN821466065421': ['OIEQNT', 'J1826969247'],\n",
       " 'DD397239756107': ['OIEQNT', 'J1826969247'],\n",
       " 'QT572399767938': ['OIEQNT', 'J1826969247'],\n",
       " 'ZK734334849457': ['OIEQNT', 'J1826969247'],\n",
       " 'DF103658054551': ['OIEQNT', 'J1826969247'],\n",
       " 'ME920748395675': ['OIEQNT', 'J1826969247'],\n",
       " 'ZV671621405773': ['OIEQNT', 'J1826969247'],\n",
       " 'QI596967367864': ['OIEQNT', 'J1826969247'],\n",
       " 'UU612293497909': ['YAAWEN', 'Y8160400491'],\n",
       " 'WH730278743000': ['YAAWEN', 'Y8160400491'],\n",
       " 'UC655426404559': ['RWHZVZ', 'G9362560391'],\n",
       " 'DU958356940380': ['RWHZVZ', 'G9362560391'],\n",
       " 'HX593332540364': ['JCMFTA', 'D4547130499'],\n",
       " 'PY229243395871': ['JONOCD', 'Z9658970283'],\n",
       " 'TK347445493949': ['JONOCD', 'Z9658970283'],\n",
       " 'BS208395535389': ['JONOCD', 'Z9658970283'],\n",
       " 'AF630883821362': ['JONOCD', 'Z9658970283'],\n",
       " 'YP986032223572': ['JONOCD', 'Z9658970283'],\n",
       " 'WW500381215126': ['JONOCD', 'Z9658970283'],\n",
       " 'AF801994078018': ['JONOCD', 'Z9658970283'],\n",
       " 'YT358887513587': ['JONOCD', 'J4725786973'],\n",
       " 'JZ684369927775': ['JONOCD', 'J4725786973'],\n",
       " 'EY662815813975': ['JONOCD', 'J4725786973'],\n",
       " 'DG923115593154': ['JCMFTA', 'X4380152755'],\n",
       " 'VQ480436088060': ['JCMFTA', 'X4380152755'],\n",
       " 'PZ459039215916': ['RWHZVZ', 'B9763030872'],\n",
       " 'JR962029141655': ['RWHZVZ', 'C1984060215'],\n",
       " 'IB758734992764': ['RWHZVZ', 'B9763030872'],\n",
       " 'GS565442512190': ['RFRFUU', 'Y1002712039'],\n",
       " 'RW929043377238': ['OIEQNT', 'N7306584861'],\n",
       " 'KX301161835958': ['OIEQNT', 'N7306584861'],\n",
       " 'PQ921864479689': ['RWHZVZ', 'W6047188045'],\n",
       " 'GF912387439043': ['RWHZVZ', 'W6047188045'],\n",
       " 'XR467412052881': ['RWHZVZ', 'W6047188045'],\n",
       " 'ZY654173621841': ['OIEQNT', 'S3273047508'],\n",
       " 'UF192768858506': ['OIEQNT', 'S3273047508'],\n",
       " 'JQ443197071912': ['RWHZVZ', 'S3273047508'],\n",
       " 'HP927765959492': ['OYSCFP', 'S3273047508'],\n",
       " 'JS887755117653': ['JCMFTA', 'G7968562327'],\n",
       " 'II321682470057': ['RWHZVZ', 'N3494736354'],\n",
       " 'IW930790262378': ['RWHZVZ', 'N3494736354'],\n",
       " 'IC975899293109': ['RWHZVZ', 'N3494736354'],\n",
       " 'YR612593474578': ['OIEQNT', 'A1484856096'],\n",
       " 'WC690808620732': ['OYSCFP', 'C7391539433'],\n",
       " 'XU945137656465': ['UCQOQO', 'Z7676665258'],\n",
       " 'HJ675215306788': ['OYSCFP', 'O5334898996'],\n",
       " 'VA688461337247': ['OYSCFP', 'O5334898996'],\n",
       " 'QK637130237783': ['OYSCFP', 'T5329447198'],\n",
       " 'MY596066378416': ['OYSCFP', 'O5334898996'],\n",
       " 'BF148288797241': ['RWHZVZ', 'M4258170962'],\n",
       " 'EO514612377835': ['JCMFTA', 'V2215426678'],\n",
       " 'HF812376296028': ['JCMFTA', 'A4416455736'],\n",
       " 'RK854181648179': ['JCMFTA', 'A4416455736'],\n",
       " 'XP817799845708': ['JCMFTA', 'A4416455736'],\n",
       " 'WH484540450178': ['JCMFTA', 'A4416455736'],\n",
       " 'ND189230924944': ['OIEQNT', 'J4306139869'],\n",
       " 'OZ347828846449': ['OIEQNT', 'J4306139869'],\n",
       " 'YY349145813714': ['OIEQNT', 'J4306139869'],\n",
       " 'ST280100627900': ['UQCRKD', 'O8605873484'],\n",
       " 'UF865022555777': ['UQCRKD', 'O8605873484'],\n",
       " 'AE636773257777': ['KJIHXD', 'O8605873484'],\n",
       " 'OX938111111927': ['OIEQNT', 'S2711763481'],\n",
       " 'VG777415653906': ['OIEQNT', 'G9237703459'],\n",
       " 'EJ952051174524': ['OIEQNT', 'G9237703459'],\n",
       " 'CE855136444563': ['OIEQNT', 'G9237703459'],\n",
       " 'SY848116673442': ['OIEQNT', 'G9237703459'],\n",
       " 'CI102261447306': ['OIEQNT', 'G9237703459'],\n",
       " 'YR547027398098': ['OIEQNT', 'G9237703459'],\n",
       " 'GO815381850617': ['OIEQNT', 'G9237703459'],\n",
       " 'TO540175190083': ['OIEQNT', 'G9237703459'],\n",
       " 'HR533632811859': ['OIEQNT', 'U3534410038'],\n",
       " 'II624224650403': ['OIEQNT', 'U3534410038'],\n",
       " 'XZ838136109509': ['OIEQNT', 'U3534410038'],\n",
       " 'LI647504099718': ['JCMFTA', 'T3585047766'],\n",
       " 'SN853883546984': ['JCMFTA', 'T3585047766'],\n",
       " 'EC786513995417': ['JCMFTA', 'T3585047766'],\n",
       " 'PC532316455577': ['JCMFTA', 'N4306861836'],\n",
       " 'MX525253431071': ['RWHZVZ', 'L2758264858'],\n",
       " 'CA899433989943': ['RWHZVZ', 'L2758264858'],\n",
       " 'YL895728021067': ['OYSCFP', 'M5147580600'],\n",
       " 'VU788550102185': ['RWHZVZ', 'I1096630347'],\n",
       " 'VC204699852973': ['OYSCFP', 'R5480015614'],\n",
       " 'SI319357417925': ['UCQOQO', 'D3035576364'],\n",
       " 'CX279874053689': ['OYSCFP', 'D1944328531'],\n",
       " 'SJ586529339550': ['OYSCFP', 'D1944328531'],\n",
       " 'DW343238634975': ['OYSCFP', 'D1944328531'],\n",
       " 'TP637298023994': ['OIEQNT', 'V9818836739'],\n",
       " 'BR526270831424': ['OIEQNT', 'V9818836739'],\n",
       " 'ZD641523329462': ['RWHZVZ', 'Q2654292540'],\n",
       " 'NF584265694710': ['OIEQNT', 'J5063485952'],\n",
       " 'OW885981467992': ['OIEQNT', 'J5063485952'],\n",
       " 'HV517567164109': ['OIEQNT', 'J5063485952'],\n",
       " 'FY828134996464': ['OIEQNT', 'J5063485952'],\n",
       " 'LT180859796067': ['OYSCFP', 'C5142108677'],\n",
       " 'VD458645241963': ['OYSCFP', 'C5142108677'],\n",
       " 'EJ555320212531': ['OYSCFP', 'C5142108677'],\n",
       " 'VM862013340470': ['OYSCFP', 'C5142108677'],\n",
       " 'ZD412924870031': ['OYSCFP', 'C5142108677'],\n",
       " 'HA697614044329': ['OYSCFP', 'C5142108677'],\n",
       " 'YW231464730098': ['OYSCFP', 'C5142108677'],\n",
       " 'LF258093915781': ['OYSCFP', 'R1366751481'],\n",
       " 'DY644423792756': ['OYSCFP', 'C5142108677'],\n",
       " 'UK563209966387': ['OYSCFP', 'C5142108677'],\n",
       " 'ZE948931300461': ['OYSCFP', 'C5142108677'],\n",
       " 'MV342873663656': ['OYSCFP', 'C5142108677'],\n",
       " 'PT304899526271': ['OYSCFP', 'C5142108677'],\n",
       " 'CF435095669737': ['OYSCFP', 'C5142108677'],\n",
       " 'EF936806462360': ['OYSCFP', 'C5142108677'],\n",
       " 'VU586660635968': ['OYSCFP', 'C5142108677'],\n",
       " 'EQ686220333462': ['OYSCFP', 'C5142108677'],\n",
       " 'KR694593842057': ['OYSCFP', 'C5142108677'],\n",
       " 'DO987047211064': ['OYSCFP', 'C5142108677'],\n",
       " 'YS444376779906': ['OYSCFP', 'C5142108677'],\n",
       " 'BM170438548354': ['OYSCFP', 'C5142108677'],\n",
       " 'GP438185133349': ['OYSCFP', 'C5142108677'],\n",
       " 'GB365694507777': ['OYSCFP', 'C5142108677'],\n",
       " 'VD585200314173': ['OYSCFP', 'C5142108677'],\n",
       " 'QL684852563001': ['OYSCFP', 'C5142108677'],\n",
       " 'QB343012445548': ['OYSCFP', 'C5142108677'],\n",
       " 'RQ888769673247': ['USCDYK', 'N6738955656'],\n",
       " 'YM892762648864': ['USCDYK', 'N6738955656'],\n",
       " 'WU889150501354': ['JCMFTA', 'W3768113270'],\n",
       " 'BC625462967772': ['JCMFTA', 'W3891199139'],\n",
       " 'BY627421862003': ['JCMFTA', 'W3891199139'],\n",
       " 'QK480931928925': ['JCMFTA', 'W3891199139'],\n",
       " 'MD643371060282': ['JCMFTA', 'W3891199139'],\n",
       " 'WX371150744422': ['JCMFTA', 'W3891199139'],\n",
       " 'JG310493592908': ['JCMFTA', 'W3891199139'],\n",
       " 'FZ834122458842': ['OYSCFP', 'X3806214427'],\n",
       " 'BD402433474254': ['OYSCFP', 'X3806214427'],\n",
       " 'QF303755878157': ['OYSCFP', 'X3806214427'],\n",
       " 'VU378479336800': ['OYSCFP', 'X3806214427'],\n",
       " 'FI846835047709': ['OYSCFP', 'X3806214427'],\n",
       " 'NB316986422742': ['OYSCFP', 'X3806214427'],\n",
       " 'UP870062147782': ['JONOCD', 'Z6173191641'],\n",
       " 'XH849380770723': ['JONOCD', 'Z6173191641'],\n",
       " 'US237397218309': ['RWHZVZ', 'W2679365313'],\n",
       " 'TM565389351463': ['BHSOUA', 'Y8117387663'],\n",
       " 'FQ912843776921': ['OYSCFP', 'H9299582126'],\n",
       " 'QG155772896507': ['RWHZVZ', 'B9763030872'],\n",
       " 'XS847483773589': ['VMUSFS', 'Q5798482444'],\n",
       " 'TJ584979858808': ['VRFMKJ', 'J3014600292'],\n",
       " 'SK708993919084': ['VMUSFS', 'W1168240540'],\n",
       " 'IY781926288217': ['JCMFTA', 'B4598664370'],\n",
       " 'XL494481028697': ['JCMFTA', 'J5729556850'],\n",
       " 'BI820437430050': ['JCMFTA', 'J5729556850'],\n",
       " 'YJ897988425259': ['JCMFTA', 'J5729556850'],\n",
       " 'SS807927981791': ['OIEQNT', 'Z3397100936'],\n",
       " 'JC170653609506': ['UCQOQO', 'T1108259808'],\n",
       " 'QG782269171401': ['JCMFTA', 'R7400965309'],\n",
       " 'QY301567984766': ['OYSCFP', 'Q6504923898'],\n",
       " 'ZP823840887519': ['RWHZVZ', 'H5238781473'],\n",
       " 'IZ570903661986': ['RWHZVZ', 'H5238781473'],\n",
       " 'FX159929864344': ['RWHZVZ', 'H5238781473'],\n",
       " 'ZE481582307159': ['RWHZVZ', 'H5238781473'],\n",
       " 'BG999456384363': ['RWHZVZ', 'H5238781473'],\n",
       " 'ZK705952668830': ['RWHZVZ', 'H5238781473'],\n",
       " 'TF229403191269': ['RWHZVZ', 'H5238781473'],\n",
       " 'IS602033166633': ['RWHZVZ', 'H5238781473'],\n",
       " 'SN335201517218': ['OIEQNT', 'M1854198485'],\n",
       " 'IM614365308426': ['OIEQNT', 'M1854198485'],\n",
       " 'IY269344763421': ['JCMFTA', 'D4743112866'],\n",
       " 'VJ392040170515': ['JCMFTA', 'S4073440762'],\n",
       " 'FG395866642481': ['JCMFTA', 'S4073440762'],\n",
       " 'MJ125595137239': ['FGPEPT', 'G1199544795'],\n",
       " 'JE331862940161': ['OIEQNT', 'H2343802217'],\n",
       " 'QY680127743563': ['OIEQNT', 'I8794136401'],\n",
       " 'JZ291784681276': ['OIEQNT', 'I8794136401'],\n",
       " 'FO559316811784': ['OIEQNT', 'I8794136401'],\n",
       " 'IM713754410993': ['OIEQNT', 'I8794136401'],\n",
       " 'EJ275072630199': ['OIEQNT', 'I8794136401'],\n",
       " 'NN589620137097': ['JCMFTA', 'X3670110891'],\n",
       " 'FW866178798838': ['JCMFTA', 'X3670110891'],\n",
       " 'LN783436750311': ['JCMFTA', 'X3670110891'],\n",
       " 'KY146979160427': ['JCMFTA', 'X3670110891'],\n",
       " 'RT913242840958': ['JCMFTA', 'X3670110891'],\n",
       " 'NU840911969527': ['JCMFTA', 'X3670110891'],\n",
       " 'KD235688987801': ['HMKTVZ', 'K1533156908'],\n",
       " 'MJ448293324602': ['HMKTVZ', 'K1533156908'],\n",
       " 'MO833050029303': ['OIEQNT', 'A5541494282'],\n",
       " 'HP142756519740': ['OIEQNT', 'A5541494282'],\n",
       " 'JV579880364411': ['JCMFTA', 'K3174130457'],\n",
       " 'WW565508713844': ['JCMFTA', 'K3174130457'],\n",
       " 'QW886406116242': ['RWHZVZ', 'H7716337968'],\n",
       " 'QB867998336705': ['RWHZVZ', 'Z5503954686'],\n",
       " 'QA823082754507': ['FGPEPT', 'Z4282939453'],\n",
       " 'WV121595634696': ['FGPEPT', 'Z4282939453'],\n",
       " 'GY828013194671': ['FGPEPT', 'Z4282939453'],\n",
       " 'RA922948650690': ['YAAWEN', 'H7230238968'],\n",
       " 'AY774949507793': ['YAAWEN', 'H7230238968'],\n",
       " 'KR314345573522': ['YAAWEN', 'H7230238968'],\n",
       " 'YZ622098643002': ['YAAWEN', 'H7230238968'],\n",
       " 'BO190603822054': ['JCMFTA', 'B2455672412'],\n",
       " 'DB294564945642': ['JCMFTA', 'B2455672412'],\n",
       " 'XL498801199558': ['JCMFTA', 'B2455672412'],\n",
       " 'TP784546049459': ['UQCRKD', 'G4099814710'],\n",
       " 'NF575335387934': ['UQCRKD', 'G4099814710'],\n",
       " 'CO249002517710': ['UQCRKD', 'G4099814710'],\n",
       " 'HV552087053339': ['UQCRKD', 'G4099814710'],\n",
       " 'TU798427655485': ['OYSCFP', 'D2424732063'],\n",
       " 'YY327315496040': ['OYSCFP', 'W6590768175'],\n",
       " 'YK250540121568': ['OIEQNT', 'I1595958258'],\n",
       " 'YS454140683802': ['OIEQNT', 'I1595958258'],\n",
       " 'PC272072824092': ['OIEQNT', 'I1595958258'],\n",
       " 'EE984852702079': ['UQCRKD', 'A8733560729'],\n",
       " 'BS927750082184': ['UQCRKD', 'A8733560729'],\n",
       " 'BD302573893054': ['UQCRKD', 'A8733560729'],\n",
       " 'TQ470621054414': ['RWHZVZ', 'M8120760288'],\n",
       " 'IS397522668079': ['FGPEPT', 'G2079989719'],\n",
       " 'ZZ391515915222': ['UQCRKD', 'H9283003522'],\n",
       " 'ZT142027495801': ['UQCRKD', 'H9283003522'],\n",
       " 'HX367201206053': ['KJIHXD', 'B6281987069'],\n",
       " 'VQ534348940489': ['KJIHXD', 'B6281987069'],\n",
       " 'XD875310737313': ['VRFMKJ', 'B6281987069'],\n",
       " 'JW597861953491': ['RWHZVZ', 'C4112501812'],\n",
       " 'TB119543610953': ['JCMFTA', 'S4798201033'],\n",
       " 'QE762284399806': ['OIEQNT', 'Q4442124384'],\n",
       " 'MO300236213908': ['UQCRKD', 'S4287553523'],\n",
       " 'KR410926315140': ['UQCRKD', 'S4287553523'],\n",
       " 'SZ972303240730': ['UQCRKD', 'S4287553523'],\n",
       " 'RZ204412129276': ['UQCRKD', 'S4287553523'],\n",
       " 'QF733544532966': ['JCMFTA', 'F3928812859'],\n",
       " 'TY599892956436': ['RWHZVZ', 'M2452649853'],\n",
       " 'IG160402207902': ['RWHZVZ', 'M2452649853'],\n",
       " 'HS620959310160': ['RWHZVZ', 'P6814319772'],\n",
       " 'PJ123056045172': ['OIEQNT', 'E2703817036'],\n",
       " 'LS523747984838': ['OIEQNT', 'E2703817036'],\n",
       " 'TZ150104527439': ['RWHZVZ', 'E2703817036'],\n",
       " 'YY408145149662': ['FGPEPT', 'B9240070902'],\n",
       " 'EQ254083563408': ['OIEQNT', 'Y7834888385'],\n",
       " 'FV501774759193': ['RWHZVZ', 'Y3246712155'],\n",
       " 'YG242715093037': ['VRFMKJ', 'M4965813287'],\n",
       " 'XQ183998690317': ['VRFMKJ', 'M4965813287'],\n",
       " 'YN385338225307': ['VRFMKJ', 'M4965813287'],\n",
       " 'YD320534529027': ['VRFMKJ', 'M4965813287'],\n",
       " 'FN659046828438': ['JCMFTA', 'O8173027298'],\n",
       " 'QG400579274272': ['JCMFTA', 'T9695017798'],\n",
       " 'HO711173764543': ['JCMFTA', 'T9695017798'],\n",
       " 'LL955137321867': ['JCMFTA', 'T9695017798'],\n",
       " 'QJ958683565788': ['JCMFTA', 'T9695017798'],\n",
       " 'VC678454538845': ['FGPEPT', 'Z1722770670'],\n",
       " 'DW325247142873': ['OYSCFP', 'T8667742153'],\n",
       " 'EY215016336354': ['OYSCFP', 'P2267739338'],\n",
       " 'NE653007832724': ['OYSCFP', 'P2267739338'],\n",
       " 'RV229958439532': ['OYSCFP', 'Y2517680547'],\n",
       " 'LR152512803366': ['OYSCFP', 'Y2517680547'],\n",
       " 'SI440461682241': ['OIEQNT', 'P2267739338'],\n",
       " 'EQ704639187817': ['OYSCFP', 'P2267739338'],\n",
       " 'RQ636267824692': ['OYSCFP', 'P2267739338'],\n",
       " 'DY373108192489': ['JCMFTA', 'I5691268546'],\n",
       " 'PP465710850399': ['UQCRKD', 'C5874596069'],\n",
       " 'VI607716889725': ['UQCRKD', 'C5874596069'],\n",
       " 'NN800025088756': ['JCMFTA', 'C5874596069'],\n",
       " 'QS697813758635': ['UQCRKD', 'C5874596069'],\n",
       " 'IH362524480140': ['UQCRKD', 'C5874596069'],\n",
       " 'OH688343969161': ['JONOCD', 'D3737458617'],\n",
       " 'OF763401455254': ['JONOCD', 'D3737458617'],\n",
       " 'PK798074650476': ['JONOCD', 'D3737458617'],\n",
       " 'SX943339940880': ['JONOCD', 'D3737458617'],\n",
       " 'PQ235296541368': ['JONOCD', 'D3737458617'],\n",
       " 'KZ620891455890': ['RWHZVZ', 'N9183333171'],\n",
       " 'JY481462394126': ['RWHZVZ', 'I4573298717'],\n",
       " 'OS258109648216': ['RWHZVZ', 'I4573298717'],\n",
       " 'OG586544455127': ['RWHZVZ', 'I4573298717'],\n",
       " 'SZ538147778912': ['RWHZVZ', 'I4573298717'],\n",
       " 'ME804813454450': ['RWHZVZ', 'I4573298717'],\n",
       " 'IP238900078673': ['RWHZVZ', 'I4573298717'],\n",
       " 'FW733237817675': ['OYSCFP', 'W3092277315'],\n",
       " 'LT195404697878': ['OIEQNT', 'W3825931876'],\n",
       " 'BF655823282149': ['OIEQNT', 'B5626507158'],\n",
       " 'IR231206242501': ['OIEQNT', 'B5626507158'],\n",
       " 'KC207081757030': ['OIEQNT', 'B5626507158'],\n",
       " 'OU733433786106': ['OIEQNT', 'B5626507158'],\n",
       " 'AJ916634114427': ['OIEQNT', 'B5626507158'],\n",
       " 'MD248483512434': ['OIEQNT', 'B5626507158'],\n",
       " 'GD205323048549': ['OIEQNT', 'B5626507158'],\n",
       " 'LW808527942411': ['OIEQNT', 'B5626507158'],\n",
       " 'BR316905836155': ['OIEQNT', 'B5626507158'],\n",
       " 'GF312031330426': ['OIEQNT', 'B5626507158'],\n",
       " 'BY220149124777': ['OIEQNT', 'B5626507158'],\n",
       " 'LZ523771769527': ['OIEQNT', 'B5626507158'],\n",
       " 'UO841129740313': ['OIEQNT', 'B5626507158'],\n",
       " 'BZ798226407347': ['OIEQNT', 'B5626507158'],\n",
       " 'RL486047442692': ['OYSCFP', 'O4455530512'],\n",
       " 'NA963182573842': ['EHGYJK', 'O4455530512'],\n",
       " 'NL885665773758': ['EHGYJK', 'O4455530512'],\n",
       " 'TM588652221926': ['OIEQNT', 'W9531321874'],\n",
       " 'ZC768506490815': ['JONOCD', 'W9531321874'],\n",
       " 'RU265159108913': ['OIEQNT', 'W9531321874'],\n",
       " 'CI524080425291': ['OIEQNT', 'W9531321874'],\n",
       " 'ZS352467453501': ['OIEQNT', 'W9531321874'],\n",
       " 'LT262801683196': ['VRFMKJ', 'P5889842409'],\n",
       " 'EO846660312157': ['VRFMKJ', 'P5889842409'],\n",
       " 'ID642672412004': ['OIEQNT', 'R7905872332'],\n",
       " 'OX415194988821': ['OYSCFP', 'R7905872332'],\n",
       " 'PI277087547850': ['JCMFTA', 'K6837163273'],\n",
       " 'RL994691571072': ['RWHZVZ', 'K6837163273'],\n",
       " 'AR621186234914': ['RWHZVZ', 'K6837163273'],\n",
       " 'YD431237704284': ['RWHZVZ', 'K6837163273'],\n",
       " 'UV414394410974': ['RWHZVZ', 'K6837163273'],\n",
       " 'UV439468111938': ['FGPEPT', 'J8284361061'],\n",
       " 'LK364830660490': ['RWHZVZ', 'P5473052392'],\n",
       " 'IT808752326684': ['OYSCFP', 'P5473052392'],\n",
       " 'OV203493028092': ['OYSCFP', 'P5473052392'],\n",
       " 'VF546585024488': ['RWHZVZ', 'P5473052392'],\n",
       " 'HZ826131858129': ['OYSCFP', 'P5473052392'],\n",
       " 'SW376178393123': ['OYSCFP', 'F8068625512'],\n",
       " 'YP723396657759': ['JONOCD', 'V8531995399'],\n",
       " 'RL122873898805': ['JONOCD', 'V8531995399'],\n",
       " 'MO789386838469': ['JONOCD', 'V8531995399'],\n",
       " 'ED770582802085': ['NWLGLX', 'J9954117400'],\n",
       " 'RU411820192100': ['NWLGLX', 'J9954117400'],\n",
       " 'TY614230314329': ['NWLGLX', 'J9954117400'],\n",
       " 'HH684422259043': ['NWLGLX', 'J9954117400'],\n",
       " 'MP506277908630': ['RWHZVZ', 'U3392127684'],\n",
       " 'HE436724701980': ['RWHZVZ', 'J1913906234'],\n",
       " 'YW956115692839': ['OYSCFP', 'Y8379772266'],\n",
       " 'NH917248045201': ['OYSCFP', 'Y8379772266'],\n",
       " 'TX401813314167': ['RWHZVZ', 'X7893960873'],\n",
       " 'TN457989876591': ['USCDYK', 'H3332112736'],\n",
       " 'CH827511912767': ['RWHZVZ', 'D7391179619'],\n",
       " 'QK903129191524': ['RWHZVZ', 'D7391179619'],\n",
       " 'LF861053550269': ['RWHZVZ', 'D7391179619'],\n",
       " 'TQ943875269489': ['JCMFTA', 'D1955356797'],\n",
       " 'IP410227355845': ['UCQOQO', 'D1955356797'],\n",
       " 'GI286676279560': ['UCQOQO', 'D1955356797'],\n",
       " 'DI635180594818': ['OYSCFP', 'B4728395566'],\n",
       " 'OR921104292928': ['OYSCFP', 'B4728395566'],\n",
       " 'QL865238770950': ['OYSCFP', 'B4728395566'],\n",
       " 'PV802311821960': ['OYSCFP', 'M7882193080'],\n",
       " 'RH470400119398': ['OYSCFP', 'M7882193080'],\n",
       " 'YU362992712613': ['OYSCFP', 'M7882193080'],\n",
       " 'EY706337806571': ['OYSCFP', 'M7882193080'],\n",
       " 'DD482452056896': ['OYSCFP', 'M7882193080'],\n",
       " 'XM278656134712': ['OYSCFP', 'M7882193080'],\n",
       " 'RH755807255998': ['OYSCFP', 'M7882193080'],\n",
       " 'SR819210469211': ['OYSCFP', 'M7882193080'],\n",
       " 'KG390834050358': ['OYSCFP', 'M7882193080'],\n",
       " 'OC419233274435': ['OYSCFP', 'M7882193080'],\n",
       " 'OZ649237450785': ['OYSCFP', 'M7882193080'],\n",
       " 'PH243070242534': ['OYSCFP', 'M7882193080'],\n",
       " 'OY556856306263': ['OYSCFP', 'M7882193080'],\n",
       " 'PP789567132221': ['OYSCFP', 'M7882193080'],\n",
       " 'VL571897446167': ['OYSCFP', 'M7882193080'],\n",
       " 'FO884142061401': ['OYSCFP', 'M7882193080'],\n",
       " 'GQ612047179240': ['OYSCFP', 'M7882193080'],\n",
       " 'LO238621964882': ['OYSCFP', 'M7882193080'],\n",
       " 'YP184159663887': ['JONOCD', 'D6077554375'],\n",
       " 'AW303805088123': ['JONOCD', 'D6077554375'],\n",
       " 'QI717251598099': ['RWHZVZ', 'L9738612131'],\n",
       " 'II254793874917': ['RWHZVZ', 'Q1790899279'],\n",
       " 'SX682634340174': ['OYSCFP', 'C3479247235'],\n",
       " 'SF285515724768': ['USCDYK', 'I1461986986'],\n",
       " 'RY586646077269': ['USCDYK', 'I1461986986'],\n",
       " 'SI267227422346': ['JCMFTA', 'R7090157998'],\n",
       " 'PJ373998653082': ['OYSCFP', 'Y2517680547'],\n",
       " 'PG241600288837': ['OIEQNT', 'J7599851928'],\n",
       " 'WW672425538065': ['OIEQNT', 'J7599851928'],\n",
       " 'XR435203501690': ['OIEQNT', 'J7599851928'],\n",
       " 'RQ885563089713': ['OYSCFP', 'W5742279408'],\n",
       " 'WW955079565634': ['OYSCFP', 'W5742279408'],\n",
       " 'SR291873102749': ['OYSCFP', 'W5742279408'],\n",
       " 'BT545529896129': ['RWHZVZ', 'X6628572836'],\n",
       " 'MV277334966542': ['RWHZVZ', 'X6628572836'],\n",
       " 'WS897158454626': ['ATREQJ', 'E8843077070'],\n",
       " 'OF200083211639': ['JCMFTA', 'P9841860298'],\n",
       " 'ZK433245032162': ['JCMFTA', 'P9841860298'],\n",
       " 'IO867884769534': ['JCMFTA', 'P9841860298'],\n",
       " 'JE399888246284': ['JCMFTA', 'P9841860298'],\n",
       " 'KI818545483287': ['VFUZBJ', 'U8970323611'],\n",
       " 'AJ128547170282': ['KJIHXD', 'D6829076019'],\n",
       " 'LW555692685411': ['KJIHXD', 'D6829076019'],\n",
       " 'DZ531455515742': ['KJIHXD', 'N3494736354'],\n",
       " 'KG929255211276': ['OYSCFP', 'H9884968226'],\n",
       " 'XQ870615862668': ['OYSCFP', 'H9884968226'],\n",
       " 'TV497936236017': ['OYSCFP', 'H9884968226'],\n",
       " 'TU102560467913': ['OYSCFP', 'H9884968226'],\n",
       " 'TQ757152802322': ['OYSCFP', 'R1366751481'],\n",
       " 'IJ290156370258': ['OYSCFP', 'H9884968226'],\n",
       " 'QG874781889548': ['OYSCFP', 'H9884968226'],\n",
       " 'PM582026173457': ['OYSCFP', 'H9884968226'],\n",
       " 'FG355810789071': ['OYSCFP', 'H9884968226'],\n",
       " 'KW684285573279': ['OYSCFP', 'H9884968226'],\n",
       " 'YF859690352641': ['OYSCFP', 'H9884968226'],\n",
       " 'AF641280380594': ['OYSCFP', 'H9884968226'],\n",
       " 'BM433903175893': ['OYSCFP', 'H9884968226'],\n",
       " 'IJ858997178294': ['OYSCFP', 'H9884968226'],\n",
       " 'HT795212236368': ['OYSCFP', 'H9884968226'],\n",
       " 'JT603187558216': ['OYSCFP', 'H9884968226'],\n",
       " 'HU805691917635': ['OYSCFP', 'H9884968226'],\n",
       " 'KF944162569891': ['OYSCFP', 'H9884968226'],\n",
       " 'XE379616551375': ['OYSCFP', 'H9884968226'],\n",
       " 'IK436030607162': ['OYSCFP', 'H9884968226'],\n",
       " 'IU314165115062': ['OYSCFP', 'F7986352297'],\n",
       " 'MJ182154464339': ['RWHZVZ', 'F7986352297'],\n",
       " 'YQ542429408664': ['RWHZVZ', 'F7986352297'],\n",
       " 'QH494800335954': ['OYSCFP', 'F7986352297'],\n",
       " 'JI234346678175': ['OYSCFP', 'F7986352297'],\n",
       " 'IR852082222976': ['OQTZLW', 'R1683758018'],\n",
       " 'XI155154159881': ['OQTZLW', 'R1683758018'],\n",
       " 'LY286712411804': ['OQTZLW', 'R1683758018'],\n",
       " 'GC201668589885': ['OQTZLW', 'R1683758018'],\n",
       " 'VZ330772578471': ['RWHZVZ', 'K9205475616'],\n",
       " 'LU894481931931': ['JONOCD', 'F1868908205'],\n",
       " 'ZT338047426061': ['JCMFTA', 'S6228077031'],\n",
       " 'XS680990757627': ['YNTVVL', 'Y5115940482'],\n",
       " 'VD859081031698': ['RWHZVZ', 'J3040700065'],\n",
       " 'QC629920908569': ['RWHZVZ', 'J3040700065'],\n",
       " 'XZ968445835720': ['VMUSFS', 'D8415336373'],\n",
       " 'QD855333047045': ['VMUSFS', 'D8415336373'],\n",
       " 'YD617849820155': ['JCMFTA', 'U7465108673'],\n",
       " 'AT211137428479': ['JCMFTA', 'U7465108673'],\n",
       " 'UR873555418521': ['OYSCFP', 'Q2910868545'],\n",
       " 'JD600448179907': ['OYSCFP', 'Q2910868545'],\n",
       " 'XG377450862602': ['OYSCFP', 'M2974939039'],\n",
       " 'UC828747170562': ['OYSCFP', 'M2974939039'],\n",
       " 'TG237491903144': ['OYSCFP', 'M2974939039'],\n",
       " 'JM904118482593': ['JONOCD', 'P4300699238'],\n",
       " 'YA714060254419': ['JONOCD', 'P4300699238'],\n",
       " 'FJ631161421312': ['OYSCFP', 'U1609564607'],\n",
       " 'LB241834022069': ['JCMFTA', 'R9286875863'],\n",
       " 'BI100633640980': ['NWLGLX', 'W2722004813'],\n",
       " 'XH191903325403': ['NWLGLX', 'W2722004813'],\n",
       " 'FZ807389000669': ['RWHZVZ', 'Q4244189904'],\n",
       " 'DK290183705210': ['RWHZVZ', 'Q4244189904'],\n",
       " 'XH626897332779': ['OYSCFP', 'Q4244189904'],\n",
       " 'TI483947375720': ['OYSCFP', 'Q4244189904'],\n",
       " 'QV709607107155': ['ENSBXC', 'R1073477879'],\n",
       " 'PZ917228849607': ['OYSCFP', 'O5334898996'],\n",
       " 'PC236973771355': ['OYSCFP', 'E8197708075'],\n",
       " 'FI967938063968': ['OYSCFP', 'E8197708075'],\n",
       " 'HO221863326996': ['OYSCFP', 'E8197708075'],\n",
       " 'SG584206824736': ['OYSCFP', 'E8197708075'],\n",
       " 'NJ443684109060': ['OYSCFP', 'E8197708075'],\n",
       " 'OJ810656812598': ['OYSCFP', 'E8197708075'],\n",
       " 'IU691596187363': ['OYSCFP', 'E8197708075'],\n",
       " 'WA494443324408': ['OYSCFP', 'E8197708075'],\n",
       " 'VK452802022900': ['OYSCFP', 'E8197708075'],\n",
       " 'JN385241428265': ['OYSCFP', 'E8197708075'],\n",
       " 'CE565983808166': ['OYSCFP', 'E8197708075'],\n",
       " 'HS706388130465': ['OQTZLW', 'M3365054536'],\n",
       " 'MT154287661848': ['OQTZLW', 'M3365054536'],\n",
       " 'VF851195817566': ['OQTZLW', 'M3365054536'],\n",
       " 'TV605961228255': ['OQTZLW', 'M3365054536'],\n",
       " 'RP520334521250': ['RWHZVZ', 'Q9560678931'],\n",
       " 'RF131184492782': ['BHSOUA', 'R4917608204'],\n",
       " 'KW889917250436': ['JCMFTA', 'T4423855536'],\n",
       " 'OV546867977832': ['JCMFTA', 'T4423855536'],\n",
       " 'UB660814168436': ['JCMFTA', 'T4423855536'],\n",
       " 'EF763401808019': ['JCMFTA', 'T4423855536'],\n",
       " 'LK823396607627': ['JCMFTA', 'T4423855536'],\n",
       " 'CO958319197960': ['JCMFTA', 'T4423855536'],\n",
       " 'TT367956259364': ['JONOCD', 'X4658123276'],\n",
       " 'UY862645422013': ['RFRFUU', 'P1955593511'],\n",
       " 'BO309410841219': ['JCMFTA', 'B5619870416'],\n",
       " 'QF240325287891': ['RWHZVZ', 'U9529991956'],\n",
       " 'QT449545929275': ['RWHZVZ', 'Q5944433711'],\n",
       " 'NG292635266754': ['RWHZVZ', 'Q5944433711'],\n",
       " 'ZG885665086479': ['OIEQNT', 'J6725831329'],\n",
       " 'FB602851083489': ['OIEQNT', 'J6725831329'],\n",
       " 'JM610891015413': ['OIEQNT', 'J6725831329'],\n",
       " 'TJ409934198849': ['OIEQNT', 'J6725831329'],\n",
       " 'OW562220023010': ['OIEQNT', 'J6725831329'],\n",
       " 'GG113273833146': ['OIEQNT', 'J6725831329'],\n",
       " 'CQ423115144730': ['OIEQNT', 'J6725831329'],\n",
       " 'DL158846687451': ['OYSCFP', 'U9529991956'],\n",
       " 'KE576664497967': ['OYSCFP', 'U9529991956'],\n",
       " 'GV140051042789': ['JCMFTA', 'R7431966941'],\n",
       " 'TP945455760193': ['JCMFTA', 'Q1300389191'],\n",
       " 'JL966507348134': ['UCQOQO', 'D3744799380'],\n",
       " 'CP312844855788': ['UCQOQO', 'D3744799380'],\n",
       " 'SO541077145974': ['OIEQNT', 'S2711763481'],\n",
       " 'CC527494857061': ['OIEQNT', 'J5063485952'],\n",
       " 'XT795019190231': ['OIEQNT', 'V8067798769'],\n",
       " 'NP923683478958': ['BHSOUA', 'R4917608204'],\n",
       " 'HF120095773348': ['USCDYK', 'H3332112736'],\n",
       " 'IM190637556040': ['USCDYK', 'H3332112736'],\n",
       " 'OS261323656791': ['USCDYK', 'H3332112736'],\n",
       " 'KH100173052127': ['USCDYK', 'H3332112736'],\n",
       " 'YZ946549358503': ['JONOCD', 'M6642057198'],\n",
       " 'BY959864243723': ['USCDYK', 'D8374108895'],\n",
       " 'BP463403231835': ['USCDYK', 'D8374108895'],\n",
       " 'JS190618953075': ['USCDYK', 'D8374108895'],\n",
       " 'OP218866382034': ['USCDYK', 'D8374108895'],\n",
       " 'ZL539399170616': ['JONOCD', 'V4022754349'],\n",
       " 'KF182769681117': ['VRFMKJ', 'J5733630409'],\n",
       " 'JI796391128640': ['VRFMKJ', 'J5733630409'],\n",
       " 'UJ430481297306': ['JCMFTA', 'B5619870416'],\n",
       " 'YJ981195261409': ['OIEQNT', 'O2722301681'],\n",
       " 'TJ341362937853': ['OIEQNT', 'O2722301681'],\n",
       " 'IX213540282134': ['OIEQNT', 'N5230316561'],\n",
       " 'YT265857616487': ['JONOCD', 'M6642057198'],\n",
       " 'UA365855894978': ['JONOCD', 'V8067798769'],\n",
       " 'GS185291156384': ['JONOCD', 'V8067798769'],\n",
       " 'UX162165795493': ['JONOCD', 'V8067798769'],\n",
       " 'GE874413750975': ['HMKTVZ', 'B1651909814'],\n",
       " 'PP642310321470': ['YAAWEN', 'B1651909814'],\n",
       " 'IY625865491761': ['JONOCD', 'V8067798769'],\n",
       " 'YO430512411904': ['OYSCFP', 'T3944934195'],\n",
       " 'TK106531083989': ['OYSCFP', 'T3944934195'],\n",
       " 'DD149449972713': ['OYSCFP', 'T3944934195'],\n",
       " 'VR465775773341': ['OYSCFP', 'T3944934195'],\n",
       " 'PH728814361569': ['OYSCFP', 'T3944934195'],\n",
       " 'WS673714308171': ['OYSCFP', 'T3944934195'],\n",
       " 'EJ770163938560': ['OYSCFP', 'T3944934195'],\n",
       " 'RW272027826864': ['OYSCFP', 'T3944934195'],\n",
       " 'MW343057986521': ['OYSCFP', 'T3944934195'],\n",
       " 'VJ143906290859': ['OYSCFP', 'T3944934195'],\n",
       " 'FY191033166264': ['HMKTVZ', 'L3767561891'],\n",
       " 'TJ749120286772': ['HMKTVZ', 'L3767561891'],\n",
       " 'YQ446191016116': ['JONOCD', 'X7080724696'],\n",
       " 'WK622236672410': ['JONOCD', 'X7080724696'],\n",
       " 'VZ499320265031': ['JONOCD', 'X7080724696'],\n",
       " 'OI436148158547': ['RWHZVZ', 'J5733630409'],\n",
       " 'RH859642722395': ['RWHZVZ', 'Q3482967311'],\n",
       " 'UB487907477311': ['RWHZVZ', 'Q3482967311'],\n",
       " 'FE377777230940': ['RWHZVZ', 'Q3482967311'],\n",
       " 'VB766272914292': ['RWHZVZ', 'Q3482967311'],\n",
       " 'MY608350864236': ['KJIHXD', 'Q3482967311'],\n",
       " 'VA440982944903': ['JONOCD', 'X7080724696'],\n",
       " 'PB342341484228': ['BHSOUA', 'X5594028020'],\n",
       " 'GH728153854686': ['BHSOUA', 'X5594028020'],\n",
       " 'AJ442260884350': ['BHSOUA', 'X5594028020'],\n",
       " 'JR854039244519': ['BHSOUA', 'X5594028020'],\n",
       " 'UC563804729032': ['BHSOUA', 'X5594028020'],\n",
       " 'FS735488979070': ['BHSOUA', 'X5594028020'],\n",
       " 'JU459999752898': ['BHSOUA', 'X5594028020'],\n",
       " 'RO192106197808': ['BHSOUA', 'X5594028020'],\n",
       " 'XF463405225113': ['VFUZBJ', 'F9861270321'],\n",
       " 'EC415606458775': ['JONOCD', 'V8626322848'],\n",
       " 'YQ123711179203': ['JONOCD', 'V8626322848'],\n",
       " 'RS386276863566': ['HMKTVZ', 'U8723500434'],\n",
       " 'DO480660045174': ['OIEQNT', 'P5086413428'],\n",
       " 'QK984662345025': ['OIEQNT', 'P5086413428'],\n",
       " 'KC424228343997': ['OIEQNT', 'O2722301681'],\n",
       " 'BJ651786417130': ['OIEQNT', 'O2722301681'],\n",
       " 'EJ831768484453': ['OIEQNT', 'O2722301681'],\n",
       " 'QQ474749505452': ['OIEQNT', 'O2722301681'],\n",
       " 'JT225121875367': ['OYSCFP', 'H6008338427'],\n",
       " 'BA564607219063': ['VRFMKJ', 'D9384167857'],\n",
       " 'GB914348620065': ['HMKTVZ', 'M6315807754'],\n",
       " 'QM357085078178': ['OIEQNT', 'Y1808674695'],\n",
       " 'FP243049893469': ['RFRFUU', 'H3332112736'],\n",
       " 'LN991926414806': ['VRFMKJ', 'C2411360398'],\n",
       " 'MT307521427650': ['OYSCFP', 'F2962859968'],\n",
       " 'KD463885495424': ['UQCRKD', 'N7236499100'],\n",
       " 'EN892924151973': ['UQCRKD', 'N7236499100'],\n",
       " 'AC118422359182': ['UQCRKD', 'N7236499100'],\n",
       " 'PL486322563493': ['UQCRKD', 'N7236499100'],\n",
       " 'ZU114098878823': ['JONOCD', 'V4022754349'],\n",
       " 'GQ137234436042': ['BHSOUA', 'O4883739671'],\n",
       " 'HE612872733357': ['BHSOUA', 'O4883739671'],\n",
       " 'LL707426295127': ['RWHZVZ', 'N3494736354'],\n",
       " 'TP426794133958': ['RWHZVZ', 'N3494736354'],\n",
       " 'CI280029540149': ['VMUSFS', 'O5815700494'],\n",
       " 'UF765415242274': ['OIEQNT', 'G5028862507'],\n",
       " 'CW715391887729': ['OIEQNT', 'K3570255740'],\n",
       " 'UJ427920235979': ['RWHZVZ', 'I7871898764'],\n",
       " 'ZL685920674210': ['RWHZVZ', 'M4980599320'],\n",
       " 'IY966180801664': ['JCMFTA', 'W2938033830'],\n",
       " 'HS228419985503': ['JCMFTA', 'W2938033830'],\n",
       " 'LK474000157357': ['JCMFTA', 'W2938033830'],\n",
       " 'NW887765855781': ['JCMFTA', 'D3035576364'],\n",
       " 'SG611668696936': ['OYSCFP', 'E6018292381'],\n",
       " 'TO189890245620': ['OYSCFP', 'E6018292381'],\n",
       " 'VZ715873847652': ['RWHZVZ', 'R1384959806'],\n",
       " 'XD749867714230': ['OYSCFP', 'E6018292381'],\n",
       " 'PU431935288902': ['OYSCFP', 'E6018292381'],\n",
       " 'QV325587070098': ['OYSCFP', 'E6018292381'],\n",
       " 'BW709150381697': ['OYSCFP', 'E6018292381'],\n",
       " 'XO996179903343': ['OYSCFP', 'E6018292381'],\n",
       " 'UH351345816764': ['OYSCFP', 'E6018292381'],\n",
       " 'ZV632863698086': ['OYSCFP', 'E6018292381'],\n",
       " 'RZ302570622373': ['OYSCFP', 'E6018292381'],\n",
       " 'PX708042594657': ['JCMFTA', 'D3035576364'],\n",
       " 'FS592339955273': ['JCMFTA', 'Y3525117740'],\n",
       " 'ZZ586794005049': ['OIEQNT', 'O2545136013'],\n",
       " 'RL712469868437': ['OIEQNT', 'O2545136013'],\n",
       " 'ZE373076782371': ['OIEQNT', 'M9236424374'],\n",
       " 'DL855377892757': ['JCMFTA', 'H3332112736'],\n",
       " 'IQ137480897326': ['JONOCD', 'D8236214490'],\n",
       " 'MJ365392402635': ['JCMFTA', 'R7568120680'],\n",
       " 'PE502831064214': ['JCMFTA', 'G9551898745'],\n",
       " 'OU634604347403': ['NWLGLX', 'R9604738366'],\n",
       " 'EF222246135790': ['JCMFTA', 'R7568120680'],\n",
       " 'GI303206405092': ['JCMFTA', 'R7568120680'],\n",
       " 'NO583073595816': ['OYSCFP', 'O3522381576'],\n",
       " 'TI736741528823': ['RFRFUU', 'N6801563148'],\n",
       " 'MX135052214954': ['RWHZVZ', 'Z2206259137'],\n",
       " 'KG442455167758': ['JCMFTA', 'Q1300389191'],\n",
       " 'YT827697940228': ['XONUPN', 'N1847155198'],\n",
       " 'PP452836435046': ['OYSCFP', 'Z2206259137'],\n",
       " 'NO334908105916': ['JCMFTA', 'C5485808536'],\n",
       " 'SL464006933658': ['OIEQNT', 'S5285110051'],\n",
       " 'GY511175718660': ['OIEQNT', 'S5285110051'],\n",
       " 'TK270585498853': ['VMUSFS', 'A5864539697'],\n",
       " 'YG709139525549': ['RWHZVZ', 'O5582509001'],\n",
       " 'UB270199198262': ['NWLGLX', 'C3532385173'],\n",
       " 'HV426014412977': ['FGPEPT', 'C4193186572'],\n",
       " 'SF951215816252': ['USCDYK', 'N6738955656'],\n",
       " 'BV264400391809': ['JCMFTA', 'V2644621972'],\n",
       " 'VJ278094044730': ['USCDYK', 'N6738955656'],\n",
       " 'XQ175308594499': ['USCDYK', 'N6738955656'],\n",
       " 'VZ759241089754': ['USCDYK', 'N6738955656'],\n",
       " 'BN158209884001': ['USCDYK', 'N6738955656'],\n",
       " 'RY612546534663': ['USCDYK', 'N6738955656'],\n",
       " 'SB666830060443': ['USCDYK', 'N6738955656'],\n",
       " 'TR881999509005': ['USCDYK', 'N6738955656'],\n",
       " 'FK324111283663': ['JCMFTA', 'P3146793228'],\n",
       " 'TP518047611804': ['FGPEPT', 'N6772629280'],\n",
       " ...}"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#获得运单对应的承运公司和船名称\n",
    "carrierName_vesselMMSI=pd.read_csv('../carrierName_vesselMMSI.csv')\n",
    "carrierName_vesselMMSI=carrierName_vesselMMSI.rename(columns={'loadingOrder':'loadingOrderRaw'})\n",
    "dic={}\n",
    "for _,oder,carrierName,vess in carrierName_vesselMMSI.itertuples():\n",
    "    dic[oder]=[carrierName,vess]\n",
    "dic"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "carrierName_vesselMMSI.drop(['vesselMMSI'],axis=1,inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "#\n",
    "gpsdf_raw=pd.read_csv('../train_B_2.csv')\n",
    "#gpsdf_raw.columns=['loadingOrder', 'timestamp', 'longitude', 'latitude', 'vesselMMSI','speed',\n",
    "       #'direction', 'TRANSPORT_TRACE','label']\n",
    "#gpsdf_raw.columns=['loadingOrder', 'timestamp', 'longitude', 'latitude','vesselMMSI','speed','direction']\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>loadingOrder</th>\n",
       "      <th>timestamp</th>\n",
       "      <th>longitude</th>\n",
       "      <th>latitude</th>\n",
       "      <th>vesselMMSI</th>\n",
       "      <th>speed</th>\n",
       "      <th>direction</th>\n",
       "      <th>test_order</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>PV234788791796_0</td>\n",
       "      <td>2020-04-09 08:09:09+00:00</td>\n",
       "      <td>110.8750</td>\n",
       "      <td>12.656250</td>\n",
       "      <td>E1665353387</td>\n",
       "      <td>20.0</td>\n",
       "      <td>20900</td>\n",
       "      <td>NJ169522947117</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>PV234788791796_0</td>\n",
       "      <td>2020-04-09 08:42:02+00:00</td>\n",
       "      <td>110.8125</td>\n",
       "      <td>12.578125</td>\n",
       "      <td>E1665353387</td>\n",
       "      <td>20.0</td>\n",
       "      <td>20900</td>\n",
       "      <td>NJ169522947117</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>PV234788791796_0</td>\n",
       "      <td>2020-04-09 08:49:46+00:00</td>\n",
       "      <td>110.8125</td>\n",
       "      <td>12.554688</td>\n",
       "      <td>E1665353387</td>\n",
       "      <td>21.0</td>\n",
       "      <td>21000</td>\n",
       "      <td>NJ169522947117</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>PV234788791796_0</td>\n",
       "      <td>2020-04-09 09:04:38+00:00</td>\n",
       "      <td>110.7500</td>\n",
       "      <td>12.507812</td>\n",
       "      <td>E1665353387</td>\n",
       "      <td>21.0</td>\n",
       "      <td>20900</td>\n",
       "      <td>NJ169522947117</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>PV234788791796_0</td>\n",
       "      <td>2020-04-09 09:06:38+00:00</td>\n",
       "      <td>110.7500</td>\n",
       "      <td>12.507812</td>\n",
       "      <td>E1665353387</td>\n",
       "      <td>21.0</td>\n",
       "      <td>20900</td>\n",
       "      <td>NJ169522947117</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57707128</th>\n",
       "      <td>DS689966033747_15642</td>\n",
       "      <td>2020-03-22 07:59:13+00:00</td>\n",
       "      <td>103.8750</td>\n",
       "      <td>1.193359</td>\n",
       "      <td>A3196742422</td>\n",
       "      <td>17.0</td>\n",
       "      <td>23650</td>\n",
       "      <td>SX540070026140</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57707129</th>\n",
       "      <td>DS689966033747_15642</td>\n",
       "      <td>2020-03-22 07:59:41+00:00</td>\n",
       "      <td>103.8750</td>\n",
       "      <td>1.192383</td>\n",
       "      <td>A3196742422</td>\n",
       "      <td>17.0</td>\n",
       "      <td>23560</td>\n",
       "      <td>SX540070026140</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57707130</th>\n",
       "      <td>DS689966033747_15642</td>\n",
       "      <td>2020-03-22 08:00:02+00:00</td>\n",
       "      <td>103.8750</td>\n",
       "      <td>1.192383</td>\n",
       "      <td>A3196742422</td>\n",
       "      <td>18.0</td>\n",
       "      <td>23600</td>\n",
       "      <td>SX540070026140</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57707131</th>\n",
       "      <td>DS689966033747_15642</td>\n",
       "      <td>2020-03-22 08:00:32+00:00</td>\n",
       "      <td>103.8125</td>\n",
       "      <td>1.191406</td>\n",
       "      <td>A3196742422</td>\n",
       "      <td>17.0</td>\n",
       "      <td>23610</td>\n",
       "      <td>SX540070026140</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57707132</th>\n",
       "      <td>DS689966033747_15642</td>\n",
       "      <td>2020-03-22 08:00:53+00:00</td>\n",
       "      <td>103.8125</td>\n",
       "      <td>1.190430</td>\n",
       "      <td>A3196742422</td>\n",
       "      <td>18.0</td>\n",
       "      <td>23630</td>\n",
       "      <td>SX540070026140</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>57707133 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                  loadingOrder                  timestamp  longitude  \\\n",
       "0             PV234788791796_0  2020-04-09 08:09:09+00:00   110.8750   \n",
       "1             PV234788791796_0  2020-04-09 08:42:02+00:00   110.8125   \n",
       "2             PV234788791796_0  2020-04-09 08:49:46+00:00   110.8125   \n",
       "3             PV234788791796_0  2020-04-09 09:04:38+00:00   110.7500   \n",
       "4             PV234788791796_0  2020-04-09 09:06:38+00:00   110.7500   \n",
       "...                        ...                        ...        ...   \n",
       "57707128  DS689966033747_15642  2020-03-22 07:59:13+00:00   103.8750   \n",
       "57707129  DS689966033747_15642  2020-03-22 07:59:41+00:00   103.8750   \n",
       "57707130  DS689966033747_15642  2020-03-22 08:00:02+00:00   103.8750   \n",
       "57707131  DS689966033747_15642  2020-03-22 08:00:32+00:00   103.8125   \n",
       "57707132  DS689966033747_15642  2020-03-22 08:00:53+00:00   103.8125   \n",
       "\n",
       "           latitude   vesselMMSI  speed  direction      test_order  \n",
       "0         12.656250  E1665353387   20.0      20900  NJ169522947117  \n",
       "1         12.578125  E1665353387   20.0      20900  NJ169522947117  \n",
       "2         12.554688  E1665353387   21.0      21000  NJ169522947117  \n",
       "3         12.507812  E1665353387   21.0      20900  NJ169522947117  \n",
       "4         12.507812  E1665353387   21.0      20900  NJ169522947117  \n",
       "...             ...          ...    ...        ...             ...  \n",
       "57707128   1.193359  A3196742422   17.0      23650  SX540070026140  \n",
       "57707129   1.192383  A3196742422   17.0      23560  SX540070026140  \n",
       "57707130   1.192383  A3196742422   18.0      23600  SX540070026140  \n",
       "57707131   1.191406  A3196742422   17.0      23610  SX540070026140  \n",
       "57707132   1.190430  A3196742422   18.0      23630  SX540070026140  \n",
       "\n",
       "[57707133 rows x 8 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "gpsdf_raw"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>loadingOrder</th>\n",
       "      <th>timestamp</th>\n",
       "      <th>longitude</th>\n",
       "      <th>latitude</th>\n",
       "      <th>vesselMMSI</th>\n",
       "      <th>speed</th>\n",
       "      <th>direction</th>\n",
       "      <th>cut_point</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>PV234788791796_0</td>\n",
       "      <td>2020-04-09 08:09:09+00:00</td>\n",
       "      <td>110.8750</td>\n",
       "      <td>12.656250</td>\n",
       "      <td>E1665353387</td>\n",
       "      <td>20.0</td>\n",
       "      <td>20900</td>\n",
       "      <td>38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>PV234788791796_0</td>\n",
       "      <td>2020-04-09 08:42:02+00:00</td>\n",
       "      <td>110.8125</td>\n",
       "      <td>12.578125</td>\n",
       "      <td>E1665353387</td>\n",
       "      <td>20.0</td>\n",
       "      <td>20900</td>\n",
       "      <td>38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>PV234788791796_0</td>\n",
       "      <td>2020-04-09 08:49:46+00:00</td>\n",
       "      <td>110.8125</td>\n",
       "      <td>12.554688</td>\n",
       "      <td>E1665353387</td>\n",
       "      <td>21.0</td>\n",
       "      <td>21000</td>\n",
       "      <td>38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>PV234788791796_0</td>\n",
       "      <td>2020-04-09 09:04:38+00:00</td>\n",
       "      <td>110.7500</td>\n",
       "      <td>12.507812</td>\n",
       "      <td>E1665353387</td>\n",
       "      <td>21.0</td>\n",
       "      <td>20900</td>\n",
       "      <td>38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>PV234788791796_0</td>\n",
       "      <td>2020-04-09 09:06:38+00:00</td>\n",
       "      <td>110.7500</td>\n",
       "      <td>12.507812</td>\n",
       "      <td>E1665353387</td>\n",
       "      <td>21.0</td>\n",
       "      <td>20900</td>\n",
       "      <td>38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57707128</th>\n",
       "      <td>ZT499590252168_15626</td>\n",
       "      <td>2020-06-27 13:57:11+00:00</td>\n",
       "      <td>103.8125</td>\n",
       "      <td>1.256836</td>\n",
       "      <td>I5822271034</td>\n",
       "      <td>5.0</td>\n",
       "      <td>900</td>\n",
       "      <td>534</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57707129</th>\n",
       "      <td>ZT499590252168_15626</td>\n",
       "      <td>2020-06-27 14:01:05+00:00</td>\n",
       "      <td>103.8125</td>\n",
       "      <td>1.258789</td>\n",
       "      <td>I5822271034</td>\n",
       "      <td>2.0</td>\n",
       "      <td>32700</td>\n",
       "      <td>534</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57707130</th>\n",
       "      <td>ZT499590252168_15626</td>\n",
       "      <td>2020-06-27 14:02:44+00:00</td>\n",
       "      <td>103.8125</td>\n",
       "      <td>1.259766</td>\n",
       "      <td>I5822271034</td>\n",
       "      <td>2.0</td>\n",
       "      <td>31400</td>\n",
       "      <td>534</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57707131</th>\n",
       "      <td>ZT499590252168_15626</td>\n",
       "      <td>2020-06-27 14:04:44+00:00</td>\n",
       "      <td>103.8125</td>\n",
       "      <td>1.259766</td>\n",
       "      <td>I5822271034</td>\n",
       "      <td>1.0</td>\n",
       "      <td>32300</td>\n",
       "      <td>534</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57707132</th>\n",
       "      <td>ZT499590252168_15626</td>\n",
       "      <td>2020-06-27 14:07:16+00:00</td>\n",
       "      <td>103.8125</td>\n",
       "      <td>1.260742</td>\n",
       "      <td>I5822271034</td>\n",
       "      <td>0.0</td>\n",
       "      <td>34600</td>\n",
       "      <td>534</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>57707133 rows × 8 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                  loadingOrder                  timestamp  longitude  \\\n",
       "0             PV234788791796_0  2020-04-09 08:09:09+00:00   110.8750   \n",
       "1             PV234788791796_0  2020-04-09 08:42:02+00:00   110.8125   \n",
       "2             PV234788791796_0  2020-04-09 08:49:46+00:00   110.8125   \n",
       "3             PV234788791796_0  2020-04-09 09:04:38+00:00   110.7500   \n",
       "4             PV234788791796_0  2020-04-09 09:06:38+00:00   110.7500   \n",
       "...                        ...                        ...        ...   \n",
       "57707128  ZT499590252168_15626  2020-06-27 13:57:11+00:00   103.8125   \n",
       "57707129  ZT499590252168_15626  2020-06-27 14:01:05+00:00   103.8125   \n",
       "57707130  ZT499590252168_15626  2020-06-27 14:02:44+00:00   103.8125   \n",
       "57707131  ZT499590252168_15626  2020-06-27 14:04:44+00:00   103.8125   \n",
       "57707132  ZT499590252168_15626  2020-06-27 14:07:16+00:00   103.8125   \n",
       "\n",
       "           latitude   vesselMMSI  speed  direction  cut_point  \n",
       "0         12.656250  E1665353387   20.0      20900         38  \n",
       "1         12.578125  E1665353387   20.0      20900         38  \n",
       "2         12.554688  E1665353387   21.0      21000         38  \n",
       "3         12.507812  E1665353387   21.0      20900         38  \n",
       "4         12.507812  E1665353387   21.0      20900         38  \n",
       "...             ...          ...    ...        ...        ...  \n",
       "57707128   1.256836  I5822271034    5.0        900        534  \n",
       "57707129   1.258789  I5822271034    2.0      32700        534  \n",
       "57707130   1.259766  I5822271034    2.0      31400        534  \n",
       "57707131   1.259766  I5822271034    1.0      32300        534  \n",
       "57707132   1.260742  I5822271034    0.0      34600        534  \n",
       "\n",
       "[57707133 rows x 8 columns]"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#每一条数据都根据测试数据来获得截断点\n",
    "def get_cutPoint():\n",
    "    test_data_path='../Btest0711_ALL.csv'\n",
    "    df_test=pd.read_csv(test_data_path)\n",
    "    grouped=df_test.groupby('loadingOrder',sort=False)\n",
    "    cnt=0\n",
    "    cut_time={'test_order':[],'cut_point':[]}\n",
    "    for name,group in grouped:\n",
    "        group=group.reset_index(drop=True)\n",
    "        cut_time['test_order'].append(name)\n",
    "        cut_time['cut_point'].append(len(group))\n",
    "    return pd.DataFrame(cut_time)\n",
    "cut_df=get_cutPoint()\n",
    "gpsdf_raw=gpsdf_raw.merge(cut_df)\n",
    "gpsdf_raw.drop(['test_order'],axis=1,inplace=True)\n",
    "gpsdf_raw"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>loadingOrder</th>\n",
       "      <th>timestamp</th>\n",
       "      <th>longitude</th>\n",
       "      <th>latitude</th>\n",
       "      <th>vesselMMSI</th>\n",
       "      <th>speed</th>\n",
       "      <th>direction</th>\n",
       "      <th>cut_point</th>\n",
       "      <th>loadingOrderRaw</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>PV234788791796_0</td>\n",
       "      <td>2020-04-09 08:09:09+00:00</td>\n",
       "      <td>110.8750</td>\n",
       "      <td>12.656250</td>\n",
       "      <td>E1665353387</td>\n",
       "      <td>20.0</td>\n",
       "      <td>20900</td>\n",
       "      <td>38</td>\n",
       "      <td>PV234788791796</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>PV234788791796_0</td>\n",
       "      <td>2020-04-09 08:42:02+00:00</td>\n",
       "      <td>110.8125</td>\n",
       "      <td>12.578125</td>\n",
       "      <td>E1665353387</td>\n",
       "      <td>20.0</td>\n",
       "      <td>20900</td>\n",
       "      <td>38</td>\n",
       "      <td>PV234788791796</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>PV234788791796_0</td>\n",
       "      <td>2020-04-09 08:49:46+00:00</td>\n",
       "      <td>110.8125</td>\n",
       "      <td>12.554688</td>\n",
       "      <td>E1665353387</td>\n",
       "      <td>21.0</td>\n",
       "      <td>21000</td>\n",
       "      <td>38</td>\n",
       "      <td>PV234788791796</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>PV234788791796_0</td>\n",
       "      <td>2020-04-09 09:04:38+00:00</td>\n",
       "      <td>110.7500</td>\n",
       "      <td>12.507812</td>\n",
       "      <td>E1665353387</td>\n",
       "      <td>21.0</td>\n",
       "      <td>20900</td>\n",
       "      <td>38</td>\n",
       "      <td>PV234788791796</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>PV234788791796_0</td>\n",
       "      <td>2020-04-09 09:06:38+00:00</td>\n",
       "      <td>110.7500</td>\n",
       "      <td>12.507812</td>\n",
       "      <td>E1665353387</td>\n",
       "      <td>21.0</td>\n",
       "      <td>20900</td>\n",
       "      <td>38</td>\n",
       "      <td>PV234788791796</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57707128</th>\n",
       "      <td>ZT499590252168_15626</td>\n",
       "      <td>2020-06-27 13:57:11+00:00</td>\n",
       "      <td>103.8125</td>\n",
       "      <td>1.256836</td>\n",
       "      <td>I5822271034</td>\n",
       "      <td>5.0</td>\n",
       "      <td>900</td>\n",
       "      <td>534</td>\n",
       "      <td>ZT499590252168</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57707129</th>\n",
       "      <td>ZT499590252168_15626</td>\n",
       "      <td>2020-06-27 14:01:05+00:00</td>\n",
       "      <td>103.8125</td>\n",
       "      <td>1.258789</td>\n",
       "      <td>I5822271034</td>\n",
       "      <td>2.0</td>\n",
       "      <td>32700</td>\n",
       "      <td>534</td>\n",
       "      <td>ZT499590252168</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57707130</th>\n",
       "      <td>ZT499590252168_15626</td>\n",
       "      <td>2020-06-27 14:02:44+00:00</td>\n",
       "      <td>103.8125</td>\n",
       "      <td>1.259766</td>\n",
       "      <td>I5822271034</td>\n",
       "      <td>2.0</td>\n",
       "      <td>31400</td>\n",
       "      <td>534</td>\n",
       "      <td>ZT499590252168</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57707131</th>\n",
       "      <td>ZT499590252168_15626</td>\n",
       "      <td>2020-06-27 14:04:44+00:00</td>\n",
       "      <td>103.8125</td>\n",
       "      <td>1.259766</td>\n",
       "      <td>I5822271034</td>\n",
       "      <td>1.0</td>\n",
       "      <td>32300</td>\n",
       "      <td>534</td>\n",
       "      <td>ZT499590252168</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>57707132</th>\n",
       "      <td>ZT499590252168_15626</td>\n",
       "      <td>2020-06-27 14:07:16+00:00</td>\n",
       "      <td>103.8125</td>\n",
       "      <td>1.260742</td>\n",
       "      <td>I5822271034</td>\n",
       "      <td>0.0</td>\n",
       "      <td>34600</td>\n",
       "      <td>534</td>\n",
       "      <td>ZT499590252168</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>57707133 rows × 9 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                  loadingOrder                  timestamp  longitude  \\\n",
       "0             PV234788791796_0  2020-04-09 08:09:09+00:00   110.8750   \n",
       "1             PV234788791796_0  2020-04-09 08:42:02+00:00   110.8125   \n",
       "2             PV234788791796_0  2020-04-09 08:49:46+00:00   110.8125   \n",
       "3             PV234788791796_0  2020-04-09 09:04:38+00:00   110.7500   \n",
       "4             PV234788791796_0  2020-04-09 09:06:38+00:00   110.7500   \n",
       "...                        ...                        ...        ...   \n",
       "57707128  ZT499590252168_15626  2020-06-27 13:57:11+00:00   103.8125   \n",
       "57707129  ZT499590252168_15626  2020-06-27 14:01:05+00:00   103.8125   \n",
       "57707130  ZT499590252168_15626  2020-06-27 14:02:44+00:00   103.8125   \n",
       "57707131  ZT499590252168_15626  2020-06-27 14:04:44+00:00   103.8125   \n",
       "57707132  ZT499590252168_15626  2020-06-27 14:07:16+00:00   103.8125   \n",
       "\n",
       "           latitude   vesselMMSI  speed  direction  cut_point loadingOrderRaw  \n",
       "0         12.656250  E1665353387   20.0      20900         38  PV234788791796  \n",
       "1         12.578125  E1665353387   20.0      20900         38  PV234788791796  \n",
       "2         12.554688  E1665353387   21.0      21000         38  PV234788791796  \n",
       "3         12.507812  E1665353387   21.0      20900         38  PV234788791796  \n",
       "4         12.507812  E1665353387   21.0      20900         38  PV234788791796  \n",
       "...             ...          ...    ...        ...        ...             ...  \n",
       "57707128   1.256836  I5822271034    5.0        900        534  ZT499590252168  \n",
       "57707129   1.258789  I5822271034    2.0      32700        534  ZT499590252168  \n",
       "57707130   1.259766  I5822271034    2.0      31400        534  ZT499590252168  \n",
       "57707131   1.259766  I5822271034    1.0      32300        534  ZT499590252168  \n",
       "57707132   1.260742  I5822271034    0.0      34600        534  ZT499590252168  \n",
       "\n",
       "[57707133 rows x 9 columns]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "odersList=[i.split('_')[0] for i in gpsdf_raw['loadingOrder'].values]\n",
    "gpsdf_raw['loadingOrderRaw']=odersList\n",
    "gpsdf_raw"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "gpsdf_rawx=gpsdf_raw.merge(carrierName_vesselMMSI)\n",
    "gpsdf_rawx.drop(['loadingOrderRaw'],axis=1,inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "finished.........\n"
     ]
    }
   ],
   "source": [
    "#对数据进行预处理\n",
    "def get_data(data, mode='train'):\n",
    "    \n",
    "    assert mode=='train' or mode=='test'\n",
    "    \n",
    "    if mode=='train':#船舶将要到达的下一个港口的预计时间,转码格式\n",
    "        pass\n",
    "    elif mode=='test':\n",
    "        data['temp_timestamp'] = data['timestamp']#当前时间\n",
    "        data['onboardDate'] = pd.to_datetime(data['onboardDate'], infer_datetime_format=True)#离开起运港时间\n",
    "    data['timestamp'] = pd.to_datetime(data['timestamp'], infer_datetime_format=True)\n",
    "    data['longitude'] = data['longitude'].astype(float)\n",
    "    data['loadingOrder'] = data['loadingOrder'].astype(str)\n",
    "    data['latitude'] = data['latitude'].astype(float)\n",
    "    data['speed'] = data['speed'].astype(float)\n",
    "    data['direction'] = data['direction'].astype(float)\n",
    "\n",
    "    return data\n",
    "gpsdf = get_data(gpsdf_rawx, mode='train')\n",
    "print('finished.........')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "15643"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(gpsdf['loadingOrder'].unique())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "正在构造训练数据\n",
      "构造训练特征所花费时间263.790s\n"
     ]
    }
   ],
   "source": [
    "import time\n",
    "import datetime\n",
    "from geopy.distance import geodesic\n",
    "\n",
    "def get_stop_time(df):\n",
    "    if len(df)<2:\n",
    "        return 0\n",
    "    time_dif=df['timestamp'].diff(1).dt.total_seconds()//3600#小时为单位\n",
    "    time_dif=time_dif.values[1:].tolist()\n",
    "    max_index=time_dif.index(max(time_dif))\n",
    "    if max_index==len(df)-2:\n",
    "        return 0\n",
    "    dsx=df['longitude'].values[max_index+1]\n",
    "    dsy=df['latitude'].values[max_index+1]\n",
    "    dex=df['longitude'].values[max_index+2]\n",
    "    dey=df['latitude'].values[max_index+2]\n",
    "    dis=geodesic((dsy,dsx), (dey,dex)).km\n",
    "    if dis<100 and max(time_dif)>100:\n",
    "        return np.max(time_dif)\n",
    "    return 0\n",
    "\n",
    "#\n",
    "def cut_zero_end(data):\n",
    "    for i in range(len(data)-1,0,-1):\n",
    "        if data[i]!=0:\n",
    "            break\n",
    "    return i+1\n",
    "def cut_zero_start(data):\n",
    "    for i in range(len(data)):\n",
    "        if data[i]!=0:\n",
    "            break\n",
    "    return i-1\n",
    "#\n",
    "def convert_name_xy(name):#输入港口名称\n",
    "    port_name=port[port['TRANS_NODE_NAME'].isin([name])].reset_index()\n",
    "    return port_name['LONGITUDE'][0],port_name['LATITUDE'][0]#返回港口经纬度\n",
    "\n",
    "def get_train_feature(df):\n",
    "    #\n",
    "    random.seed(0)\n",
    "    vesselMMSI=df['vesselMMSI'].values[0]\n",
    "    carrierName=df['carrierName'].values[0]\n",
    "    #构建年份,月份特征\n",
    "    #label=df['label'].values[0]\n",
    "    y_m=str(df['timestamp'].values[0])\n",
    "    year=int(y_m.split('-')[0])\n",
    "    month=y_m.split('-')[1]\n",
    "    if month[0]=='0':\n",
    "        month=int(month[1])\n",
    "    else:\n",
    "        month=int(month)\n",
    "    #\n",
    "    #portNames=df['TRANSPORT_TRACE'].values[0]\n",
    "    #portNames=portNames.split('-')\n",
    "    #cnt_turn=len(portNames)-2\n",
    "    data=list(df['speed'])\n",
    "    cut_start=0\n",
    "    cut_end=len(df)\n",
    "    #if data[0]==0:\n",
    "        #cut_start=cut_zero_start(data)\n",
    "    #if data[-1]==0:\n",
    "        #cut_end=cut_zero_end(data)\n",
    "    df=df[cut_start:cut_end].reset_index(drop=True)\n",
    "    if len(df)<10:\n",
    "        return [0 for i in range(39)]\n",
    "    feature=[]\n",
    "    length=len(df)\n",
    "    sx=df['longitude'][0]\n",
    "    sy=df['latitude'][0]\n",
    "    ex=df['longitude'][length-1]\n",
    "    ey=df['latitude'][length-1]\n",
    "    \n",
    "    dis=geodesic((sy,sx), (ey,ex)).km\n",
    "    lon_dis=abs(ex-sx)\n",
    "    lat_dis=abs(ey-sy)\n",
    "    dis_sqrt=np.sqrt(lon_dis*lon_dis+lat_dis*lat_dis)\n",
    "    \n",
    "    dir_k=lat_dis/lon_dis\n",
    "    label=(df['timestamp'][length-1]-df['timestamp'][0]).total_seconds()/3600\n",
    "    #下面开始截断\n",
    "    if length<200:\n",
    "        cut_ratio=0.5\n",
    "    else:\n",
    "        cut_ratio=random.choice([0.1,0.15,0.2,0.25,0.3])\n",
    "        #cut_ratio=random.choice([0.3,0.3])\n",
    "    #df=df[:int(length*cut_ratio)]\n",
    "    df=df[:df['cut_point'].values[0]]\n",
    "    #\n",
    "    stopTime=get_stop_time(df)\n",
    "    #\n",
    "    length=len(df)\n",
    "    dsx=df['longitude'][0]\n",
    "    dsy=df['latitude'][0]\n",
    "    dex=df['longitude'][length-1]\n",
    "    dey=df['latitude'][length-1]\n",
    "    cal_dis=geodesic((dsy,dsx), (dey,dex)).km#截取出来的一段距离\n",
    "    cut_label=(df['timestamp'][length-1]-df['timestamp'][0]).total_seconds()/3600\n",
    "    \n",
    "    cal_speed=cal_dis/(cut_label+0.1)\n",
    "\n",
    "    df['lat_diff']=df['latitude'].diff(1)\n",
    "    df['lon_diff']=df['longitude'].diff(1)\n",
    "    df['k']=df['lat_diff']/df['lon_diff']\n",
    "    #\n",
    "    df['speed_diff'] = df['speed'].diff(1)#速度变化量\n",
    "    df['diff_minutes'] =df['timestamp'].diff(1).dt.total_seconds() / 60#记录之间的间隔时间(单位:s)\n",
    "    #\n",
    "    k_1_4=df['k'].quantile(0.25)\n",
    "    k_median=df['k'].quantile(0.5)\n",
    "    k_3_4=df['k'].quantile(0.75)\n",
    "    #在所有的记录中，多少记录是停船状态\n",
    "    #df['anchor'] = ((df['lat_diff'] <= 0.03) & (df['lon_diff'] <= 0.03)& (df['speed_diff'] <= 0.3) & (df['diff_minutes'] <= 10)).astype(int)\n",
    "    df['anchor'] = ((df['lat_diff'].abs() <= 0.03) & (df['lon_diff'].abs() <= 0.03)& (df['speed_diff'] <= 0.3) & (df['diff_minutes'] >= 10)).astype(int)\n",
    "\n",
    "    anchor_cnt = df['anchor'].sum()\n",
    "    anchor_ratio = anchor_cnt / len(df)\n",
    "    \n",
    "    \n",
    "    #\n",
    "    lat_1_4=df['latitude'].quantile(0.25)\n",
    "    lat_3_4=df['latitude'].quantile(0.75)\n",
    "    lat_min=df['latitude'].min()\n",
    "    lat_max=df['latitude'].max()\n",
    "    lat_mean=df['latitude'].mean()\n",
    "    lat_median=df['latitude'].median()\n",
    "    #\n",
    "    lon_1_4=df['longitude'].quantile(0.25)\n",
    "    lon_3_4=df['longitude'].quantile(0.75)\n",
    "    longitude_1_4=df['longitude'].quantile(0.25)\n",
    "    longitude_3_4=df['longitude'].quantile(0.75)\n",
    "    lon_min=df['longitude'].min()\n",
    "    lon_max=df['longitude'].max()\n",
    "    lon_mean=df['longitude'].mean()\n",
    "    lon_median=df['longitude'].median()\n",
    "    #\n",
    "    speed_1_4=df['speed'].quantile(0.25)\n",
    "    speed_3_4=df['speed'].quantile(0.75)\n",
    "    speed_max=df['speed'].max()\n",
    "    speed_mean=df['speed'].mean()\n",
    "    speed_median=df['speed'].median()\n",
    "    #\n",
    "    direction_1_4=df['direction'].quantile(0.25)\n",
    "    direction_3_4=df['direction'].quantile(0.75)\n",
    "    direction_min=df['direction'].min()\n",
    "    direction_max=df['direction'].max()\n",
    "    direction_mean=df['direction'].mean()\n",
    "    direction_median=df['direction'].median()\n",
    "    #\n",
    "    feature.append(k_1_4)\n",
    "    feature.append(k_3_4)\n",
    "    feature.append(k_median)\n",
    "    feature.append(anchor_cnt)\n",
    "    feature.append(anchor_ratio)\n",
    "    #\n",
    "    feature.append(lat_1_4)\n",
    "    feature.append(lat_3_4)\n",
    "    feature.append(lat_max)\n",
    "    feature.append(lat_min)\n",
    "    feature.append(lat_median)\n",
    "    feature.append(lat_mean)\n",
    "    #\n",
    "    feature.append(lon_1_4)\n",
    "    feature.append(lon_3_4)\n",
    "    feature.append(lon_max)\n",
    "    feature.append(lon_min)\n",
    "    feature.append(lon_median)\n",
    "    feature.append(lon_mean)\n",
    "    #\n",
    "    feature.append(speed_1_4)\n",
    "    feature.append(speed_3_4)\n",
    "    feature.append(speed_max)\n",
    "    feature.append(speed_median)\n",
    "    feature.append(speed_mean)\n",
    "    #\n",
    "    feature.append(direction_1_4)\n",
    "    feature.append(direction_3_4)\n",
    "    feature.append(direction_max)\n",
    "    feature.append(direction_min)\n",
    "    feature.append(direction_median)\n",
    "    feature.append(direction_mean)\n",
    "    #\n",
    "    feature.append(sx)\n",
    "    feature.append(sy)\n",
    "    feature.append(ex)\n",
    "    feature.append(ey)\n",
    "    feature.append(dis)\n",
    "    feature.append(lon_dis)\n",
    "    feature.append(lat_dis)\n",
    "    feature.append(cal_speed)\n",
    "    feature.append(dis_sqrt)\n",
    "    #feature.append(cnt_turn)\n",
    "    feature.append(year)\n",
    "    feature.append(month)\n",
    "    feature.append(abs(dir_k))\n",
    "    feature.append(vesselMMSI)\n",
    "    feature.append(carrierName)\n",
    "    feature.append(stopTime)\n",
    "    feature.append(cal_dis)\n",
    "    feature.append(cut_label)\n",
    "    feature.append(label)\n",
    "\n",
    "    return feature\n",
    "#\n",
    "import random\n",
    "from geopy.distance import geodesic\n",
    "import time\n",
    "def make_train_data(df):\n",
    "    features=[]\n",
    "    grouped=df.groupby('loadingOrder')\n",
    "    #\n",
    "    start_time=time.time()\n",
    "    print('正在构造训练数据')\n",
    "    start_time=time.time()\n",
    "    for name,group in grouped:\n",
    "        #sample_trace=df.loc[group.index[bottom:top+1]].reset_index(drop=True)#这里的sample_trace是截取出的一段轨迹(一个训练样本)\n",
    "        sample_trace=group.reset_index(drop=True)\n",
    "        features.append(get_train_feature(sample_trace))\n",
    "    print(\"构造训练特征所花费时间%.3fs\"%(time.time()-start_time))\n",
    "    return features\n",
    "#\n",
    "train_features=make_train_data(gpsdf)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 观察训练数据标签的分布\n",
    "- 最长时间:86.28858796296296 day\n",
    "- 最短时间:0.0 day\n",
    "- 平均时间:16.70094809971483 day\n",
    "\n",
    "## 而测试数据中已知的轨迹长度为：\n",
    "- 最长时间:16.88171296296296 day\n",
    "- 最短时间:0.046527777777777786 day\n",
    "- 平均时间:4.325498415081749 day\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "#\n",
    "test_data_path='../Btest0711_ALL.csv'\n",
    "df_test=pd.read_csv(test_data_path)\n",
    "df_test=get_data(df_test, mode='test')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(57071, 11)\n",
      "(51821, 11)\n"
     ]
    }
   ],
   "source": [
    "#测试集去重复\n",
    "print(df_test.shape)\n",
    "df_test.drop_duplicates(['loadingOrder','timestamp','longitude','latitude'],inplace=True)\n",
    "df_test=df_test.reset_index(drop=True)\n",
    "print(df_test.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(64.86215831705493, 1278.7455986861912)"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "geodesic((21.992502,91.766085),(22.5777,91.793321)).km,geodesic((9.257433,-79.918050),(17.507049,-88.195506)).km,"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>loadingOrder</th>\n",
       "      <th>timestamp</th>\n",
       "      <th>longitude</th>\n",
       "      <th>latitude</th>\n",
       "      <th>speed</th>\n",
       "      <th>direction</th>\n",
       "      <th>carrierName</th>\n",
       "      <th>vesselMMSI</th>\n",
       "      <th>onboardDate</th>\n",
       "      <th>TRANSPORT_TRACE</th>\n",
       "      <th>temp_timestamp</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>36874</th>\n",
       "      <td>OT831938188749</td>\n",
       "      <td>2020-06-01 00:06:57+00:00</td>\n",
       "      <td>91.767112</td>\n",
       "      <td>21.992717</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4720.0</td>\n",
       "      <td>USCDYK</td>\n",
       "      <td>K1804469309</td>\n",
       "      <td>2020-06-01 00:06:57</td>\n",
       "      <td>CNYTN-BDCGP</td>\n",
       "      <td>2020-06-01T00:06:57.000Z</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36875</th>\n",
       "      <td>OT831938188749</td>\n",
       "      <td>2020-06-01 00:10:32+00:00</td>\n",
       "      <td>91.766667</td>\n",
       "      <td>21.991667</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4700.0</td>\n",
       "      <td>USCDYK</td>\n",
       "      <td>K1804469309</td>\n",
       "      <td>2020-06-01 00:06:57</td>\n",
       "      <td>CNYTN-BDCGP</td>\n",
       "      <td>2020-06-01T00:10:32.000Z</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36876</th>\n",
       "      <td>OT831938188749</td>\n",
       "      <td>2020-06-01 00:16:31+00:00</td>\n",
       "      <td>91.766667</td>\n",
       "      <td>21.991667</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4700.0</td>\n",
       "      <td>USCDYK</td>\n",
       "      <td>K1804469309</td>\n",
       "      <td>2020-06-01 00:06:57</td>\n",
       "      <td>CNYTN-BDCGP</td>\n",
       "      <td>2020-06-01T00:16:31.000Z</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36877</th>\n",
       "      <td>OT831938188749</td>\n",
       "      <td>2020-06-01 00:18:59+00:00</td>\n",
       "      <td>91.767240</td>\n",
       "      <td>21.992703</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4720.0</td>\n",
       "      <td>USCDYK</td>\n",
       "      <td>K1804469309</td>\n",
       "      <td>2020-06-01 00:06:57</td>\n",
       "      <td>CNYTN-BDCGP</td>\n",
       "      <td>2020-06-01T00:18:59.000Z</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>36878</th>\n",
       "      <td>OT831938188749</td>\n",
       "      <td>2020-06-01 00:30:57+00:00</td>\n",
       "      <td>91.767207</td>\n",
       "      <td>21.992773</td>\n",
       "      <td>0.0</td>\n",
       "      <td>4700.0</td>\n",
       "      <td>USCDYK</td>\n",
       "      <td>K1804469309</td>\n",
       "      <td>2020-06-01 00:06:57</td>\n",
       "      <td>CNYTN-BDCGP</td>\n",
       "      <td>2020-06-01T00:30:57.000Z</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37104</th>\n",
       "      <td>OT831938188749</td>\n",
       "      <td>2020-06-01 23:34:00+00:00</td>\n",
       "      <td>91.765955</td>\n",
       "      <td>21.992342</td>\n",
       "      <td>0.0</td>\n",
       "      <td>6680.0</td>\n",
       "      <td>USCDYK</td>\n",
       "      <td>K1804469309</td>\n",
       "      <td>2020-06-01 00:06:57</td>\n",
       "      <td>CNYTN-BDCGP</td>\n",
       "      <td>2020-06-01T23:34:00.000Z</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37105</th>\n",
       "      <td>OT831938188749</td>\n",
       "      <td>2020-06-01 23:37:02+00:00</td>\n",
       "      <td>91.765978</td>\n",
       "      <td>21.992317</td>\n",
       "      <td>0.0</td>\n",
       "      <td>6680.0</td>\n",
       "      <td>USCDYK</td>\n",
       "      <td>K1804469309</td>\n",
       "      <td>2020-06-01 00:06:57</td>\n",
       "      <td>CNYTN-BDCGP</td>\n",
       "      <td>2020-06-01T23:37:02.000Z</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37106</th>\n",
       "      <td>OT831938188749</td>\n",
       "      <td>2020-06-01 23:43:01+00:00</td>\n",
       "      <td>91.765985</td>\n",
       "      <td>21.992308</td>\n",
       "      <td>0.0</td>\n",
       "      <td>6680.0</td>\n",
       "      <td>USCDYK</td>\n",
       "      <td>K1804469309</td>\n",
       "      <td>2020-06-01 00:06:57</td>\n",
       "      <td>CNYTN-BDCGP</td>\n",
       "      <td>2020-06-01T23:43:01.000Z</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37107</th>\n",
       "      <td>OT831938188749</td>\n",
       "      <td>2020-06-01 23:46:02+00:00</td>\n",
       "      <td>91.765963</td>\n",
       "      <td>21.992382</td>\n",
       "      <td>0.0</td>\n",
       "      <td>6680.0</td>\n",
       "      <td>USCDYK</td>\n",
       "      <td>K1804469309</td>\n",
       "      <td>2020-06-01 00:06:57</td>\n",
       "      <td>CNYTN-BDCGP</td>\n",
       "      <td>2020-06-01T23:46:02.000Z</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37108</th>\n",
       "      <td>OT831938188749</td>\n",
       "      <td>2020-06-01 23:58:02+00:00</td>\n",
       "      <td>91.766085</td>\n",
       "      <td>21.992502</td>\n",
       "      <td>0.0</td>\n",
       "      <td>840.0</td>\n",
       "      <td>USCDYK</td>\n",
       "      <td>K1804469309</td>\n",
       "      <td>2020-06-01 00:06:57</td>\n",
       "      <td>CNYTN-BDCGP</td>\n",
       "      <td>2020-06-01T23:58:02.000Z</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>235 rows × 11 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         loadingOrder                 timestamp  longitude   latitude  speed  \\\n",
       "36874  OT831938188749 2020-06-01 00:06:57+00:00  91.767112  21.992717    0.0   \n",
       "36875  OT831938188749 2020-06-01 00:10:32+00:00  91.766667  21.991667    0.0   \n",
       "36876  OT831938188749 2020-06-01 00:16:31+00:00  91.766667  21.991667    0.0   \n",
       "36877  OT831938188749 2020-06-01 00:18:59+00:00  91.767240  21.992703    0.0   \n",
       "36878  OT831938188749 2020-06-01 00:30:57+00:00  91.767207  21.992773    0.0   \n",
       "...               ...                       ...        ...        ...    ...   \n",
       "37104  OT831938188749 2020-06-01 23:34:00+00:00  91.765955  21.992342    0.0   \n",
       "37105  OT831938188749 2020-06-01 23:37:02+00:00  91.765978  21.992317    0.0   \n",
       "37106  OT831938188749 2020-06-01 23:43:01+00:00  91.765985  21.992308    0.0   \n",
       "37107  OT831938188749 2020-06-01 23:46:02+00:00  91.765963  21.992382    0.0   \n",
       "37108  OT831938188749 2020-06-01 23:58:02+00:00  91.766085  21.992502    0.0   \n",
       "\n",
       "       direction carrierName   vesselMMSI         onboardDate TRANSPORT_TRACE  \\\n",
       "36874     4720.0      USCDYK  K1804469309 2020-06-01 00:06:57     CNYTN-BDCGP   \n",
       "36875     4700.0      USCDYK  K1804469309 2020-06-01 00:06:57     CNYTN-BDCGP   \n",
       "36876     4700.0      USCDYK  K1804469309 2020-06-01 00:06:57     CNYTN-BDCGP   \n",
       "36877     4720.0      USCDYK  K1804469309 2020-06-01 00:06:57     CNYTN-BDCGP   \n",
       "36878     4700.0      USCDYK  K1804469309 2020-06-01 00:06:57     CNYTN-BDCGP   \n",
       "...          ...         ...          ...                 ...             ...   \n",
       "37104     6680.0      USCDYK  K1804469309 2020-06-01 00:06:57     CNYTN-BDCGP   \n",
       "37105     6680.0      USCDYK  K1804469309 2020-06-01 00:06:57     CNYTN-BDCGP   \n",
       "37106     6680.0      USCDYK  K1804469309 2020-06-01 00:06:57     CNYTN-BDCGP   \n",
       "37107     6680.0      USCDYK  K1804469309 2020-06-01 00:06:57     CNYTN-BDCGP   \n",
       "37108      840.0      USCDYK  K1804469309 2020-06-01 00:06:57     CNYTN-BDCGP   \n",
       "\n",
       "                 temp_timestamp  \n",
       "36874  2020-06-01T00:06:57.000Z  \n",
       "36875  2020-06-01T00:10:32.000Z  \n",
       "36876  2020-06-01T00:16:31.000Z  \n",
       "36877  2020-06-01T00:18:59.000Z  \n",
       "36878  2020-06-01T00:30:57.000Z  \n",
       "...                         ...  \n",
       "37104  2020-06-01T23:34:00.000Z  \n",
       "37105  2020-06-01T23:37:02.000Z  \n",
       "37106  2020-06-01T23:43:01.000Z  \n",
       "37107  2020-06-01T23:46:02.000Z  \n",
       "37108  2020-06-01T23:58:02.000Z  \n",
       "\n",
       "[235 rows x 11 columns]"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_test[df_test['loadingOrder'].isin(['OT831938188749'])]#1-12日出发，1-16开始截取"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "NJ169522947117 33.0\n",
      "SX540070026140 61.0\n",
      "OO873074032241 15.0\n",
      "NR607703947338 37.0\n",
      "KM253531604156 7.0\n",
      "QU249399134445 58.0\n",
      "MP735256846031 10.0\n",
      "KL360554759061 47.0\n",
      "NS866700256990 1.0\n",
      "TF722779974129 26.0\n",
      "QJ557016405590 47.0\n",
      "MR751998810986 16.0\n",
      "ZE116354019316 47.0\n",
      "DT646086023962 1.0\n",
      "WJ407730330037 43.0\n",
      "OM947033486726 11.0\n",
      "CM497289515836 55.0\n",
      "ON494255048100 11.0\n",
      "YR797323753737 1.0\n",
      "OC805181767790 59.0\n",
      "QU447763856742 19.0\n",
      "NS287207846338 18.0\n",
      "JL847444670297 6.0\n",
      "CA203943622343 2.0\n",
      "FL920999114498 55.0\n",
      "RY274238141243 1.0\n"
     ]
    }
   ],
   "source": [
    "#判断onboard_time和第一条记录的时间是否相等\n",
    "#总共10个运单的onboard/第一条时间差距大于一个小时，大于一天的有两个运单\n",
    "#'DH829189593918':105h;'LE381377964668':68.0\n",
    "grouped=df_test.groupby('loadingOrder',sort=False)\n",
    "cnt=0\n",
    "for name,group in grouped:\n",
    "    group=group.reset_index(drop=True)\n",
    "    dft=pd.to_datetime(group['timestamp'] ).apply(lambda x: x.replace(tzinfo=None))\n",
    "    delta=(dft[:1][0]-group['onboardDate'][:1][0]).total_seconds()//3600\n",
    "    if delta!=0:\n",
    "        print(name,delta)#总共10个运单的onboard和第一条时间戳不一致\n",
    "    cnt+=1\n",
    "#这里面的10个不一致的订单是需要最好减掉的"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "\"\\nlen_list=[]\\ndelta=[]\\ngrouped=df_test.groupby('loadingOrder')\\nfor name,group in grouped:\\n    len_list.append(len(group))\\n    group=group.reset_index(drop=True)\\n    tmp=group['timestamp'].values\\n    delta.append(pd.Timedelta((tmp[-1]-tmp[1])).total_seconds()/3600/24)\\n    if len(group)<10:\\n        print(name)\\n\\nprint(np.min(len_list),np.mean(len_list),np.max(len_list))\\n    \\nprint(np.min(delta),np.mean(delta),np.max(delta))\\n\""
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "'''\n",
    "len_list=[]\n",
    "delta=[]\n",
    "grouped=df_test.groupby('loadingOrder')\n",
    "for name,group in grouped:\n",
    "    len_list.append(len(group))\n",
    "    group=group.reset_index(drop=True)\n",
    "    tmp=group['timestamp'].values\n",
    "    delta.append(pd.Timedelta((tmp[-1]-tmp[1])).total_seconds()/3600/24)\n",
    "    if len(group)<10:\n",
    "        print(name)\n",
    "\n",
    "print(np.min(len_list),np.mean(len_list),np.max(len_list))\n",
    "    \n",
    "print(np.min(delta),np.mean(delta),np.max(delta))\n",
    "'''\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "#sorted(len_list)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 测试数据:共94对(31对中间港口，最多中间港有14个)港口，219条运单，其中很多含有中间港口"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "def convert_name_xy(name):#输入港口名称\n",
    "    port_name=port[port['TRANS_NODE_NAME'].isin([name])].reset_index()\n",
    "    return port_name['LONGITUDE'][0],port_name['LATITUDE'][0]#返回港口经纬度\n",
    "#  \n",
    "start_x=[]#起点\n",
    "start_y=[]#起点\n",
    "end_x=[]#终点\n",
    "end_y=[]#终点\n",
    "#存储中间结果,避免重复计算\n",
    "temp_dic={}\n",
    "for value in df_test['TRANSPORT_TRACE']:\n",
    "    s_e=value.split('-')\n",
    "    start_port=s_e[0]\n",
    "    end_port=s_e[-1]\n",
    "    if start_port in temp_dic:\n",
    "        re=temp_dic[start_port]\n",
    "    else:\n",
    "        re=convert_name_xy(start_port)\n",
    "        temp_dic[start_port]=re\n",
    "    start_x.append(re[0])\n",
    "    start_y.append(re[1])\n",
    "    if end_port in temp_dic:\n",
    "        re=temp_dic[end_port]\n",
    "    else:\n",
    "        re=convert_name_xy(end_port)\n",
    "        temp_dic[end_port]=re\n",
    "    end_x.append(re[0])\n",
    "    end_y.append(re[1])\n",
    "df_test['start_x']=start_x\n",
    "df_test['start_y']=start_y\n",
    "df_test['end_x']=end_x\n",
    "df_test['end_y']=end_y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "14.75464066849408"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "geodesic((29.1,112), (29,112.1)).km"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "finished1...\n",
      "正在构造测试数据........\n",
      "构造测试数据所花费时间3.398s\n"
     ]
    }
   ],
   "source": [
    "import time\n",
    "from geopy.distance import geodesic\n",
    "#\n",
    "def get_stop_time(df):\n",
    "    if len(df)<2:\n",
    "        return 0\n",
    "    time_dif=df['timestamp'].diff(1).dt.total_seconds()//3600#小时为单位\n",
    "    time_dif=time_dif.values[1:].tolist()\n",
    "    max_index=time_dif.index(max(time_dif))\n",
    "    if max_index==len(df)-2:\n",
    "        return 0\n",
    "    dsx=df['longitude'].values[max_index+1]\n",
    "    dsy=df['latitude'].values[max_index+1]\n",
    "    dex=df['longitude'].values[max_index+2]\n",
    "    dey=df['latitude'].values[max_index+2]\n",
    "    dis=geodesic((dsy,dsx), (dey,dex)).km\n",
    "    if dis<100 and max(time_dif)>100:\n",
    "        return np.max(time_dif)\n",
    "    return 0\n",
    "#\n",
    "def get_test_feature(df,name):\n",
    "    #\n",
    "    #\n",
    "    vesselMMSI=df['vesselMMSI'].values[0]\n",
    "    carrierName=df['carrierName'].values[0]\n",
    "    #\n",
    "    y_m=str(df['timestamp'].values[0])\n",
    "    year=int(y_m.split('-')[0])\n",
    "    month=y_m.split('-')[1]\n",
    "    if month[0]=='0':\n",
    "        month=int(month[1])\n",
    "    else:\n",
    "        month=int(month)\n",
    "    #\n",
    "    portNames=df['TRANSPORT_TRACE'].values[0]\n",
    "    portNames=portNames.split('-')\n",
    "    #cnt_turn=len(portNames)-2\n",
    "    df.sort_values(['timestamp'], inplace=True)\n",
    "    df=df.reset_index(drop=True)\n",
    "    feature=[]\n",
    "    length=len(df)\n",
    "    dsx=df['longitude'][0]\n",
    "    dsy=df['latitude'][0]\n",
    "    dex=df['longitude'][length-1]\n",
    "    dey=df['latitude'][length-1]\n",
    "    #\n",
    "    sx=df['longitude'][0]#df['start_x'][0]\n",
    "    sy=df['latitude'][0]#df['start_y'][0]\n",
    "    ex=df['end_x'][length-1]\n",
    "    ey=df['end_y'][length-1]\n",
    "    \n",
    "    dis=geodesic((sy,sx), (ey,ex)).km\n",
    "    lon_dis=abs(ex-sx)\n",
    "    lat_dis=abs(ey-sy)\n",
    "    dis_sqrt=np.sqrt(lon_dis*lon_dis+lat_dis*lat_dis)\n",
    "    \n",
    "    dir_k=lat_dis/lon_dis\n",
    "    stopTime=get_stop_time(df)\n",
    "    \n",
    "    label=(df['timestamp'][length-1]-df['timestamp'][0]).total_seconds()/3600\n",
    "    cal_dis=geodesic((dsy,dsx), (dey,dex)).km\n",
    "    cal_speed=cal_dis/(label+0.1)\n",
    "    df['lat_diff']=df['latitude'].diff(1)\n",
    "    df['lon_diff']=df['longitude'].diff(1)\n",
    "    df['k']=df['lat_diff']/df['lon_diff']\n",
    "    #\n",
    "    df['speed_diff'] = df['speed'].diff(1)#速度变化量\n",
    "    df['diff_minutes'] =df['timestamp'].diff(1).dt.total_seconds() / 60#记录之间的间隔时间(单位:s)\n",
    "    #\n",
    "    k_1_4=df['k'].quantile(0.25)\n",
    "    k_median=df['k'].quantile(0.5)\n",
    "    k_3_4=df['k'].quantile(0.75)\n",
    "    #在所有的记录中，多少记录是停船状态\n",
    "    df['anchor'] = ((df['lat_diff'].abs() <= 0.03) & (df['lon_diff'].abs() <= 0.03)& (df['speed_diff'] <= 0.3) & (df['diff_minutes'] >= 15)).astype(int)\n",
    "\n",
    "    anchor_cnt = df['anchor'].sum()\n",
    "    anchor_ratio = anchor_cnt / len(df)\n",
    "    #\n",
    "    lat_1_4=df['latitude'].quantile(0.25)\n",
    "    lat_3_4=df['latitude'].quantile(0.75)\n",
    "    lat_min=df['latitude'].min()\n",
    "    lat_max=df['latitude'].max()\n",
    "    lat_mean=df['latitude'].mean()\n",
    "    lat_median=df['latitude'].median()\n",
    "    #\n",
    "    lon_1_4=df['longitude'].quantile(0.25)\n",
    "    lon_3_4=df['longitude'].quantile(0.75)\n",
    "    longitude_1_4=df['longitude'].quantile(0.25)\n",
    "    longitude_3_4=df['longitude'].quantile(0.75)\n",
    "    lon_min=df['longitude'].min()\n",
    "    lon_max=df['longitude'].max()\n",
    "    lon_mean=df['longitude'].mean()\n",
    "    lon_median=df['longitude'].median()\n",
    "    #\n",
    "    speed_1_4=df['speed'].quantile(0.25)\n",
    "    speed_3_4=df['speed'].quantile(0.75)\n",
    "    speed_min=df['speed'].min()\n",
    "    speed_max=df['speed'].max()\n",
    "    speed_mean=df['speed'].mean()\n",
    "    speed_median=df['speed'].median()\n",
    "    #\n",
    "    direction_1_4=df['direction'].quantile(0.25)\n",
    "    direction_3_4=df['direction'].quantile(0.75)\n",
    "    direction_min=df['direction'].min()\n",
    "    direction_max=df['direction'].max()\n",
    "    direction_mean=df['direction'].mean()\n",
    "    direction_median=df['direction'].median()\n",
    "    #\n",
    "    feature.append(name)\n",
    "    feature.append(k_1_4)\n",
    "    feature.append(k_3_4)\n",
    "    feature.append(k_median)\n",
    "    feature.append(anchor_cnt)\n",
    "    feature.append(anchor_ratio)\n",
    "    #\n",
    "    feature.append(lat_1_4)\n",
    "    feature.append(lat_3_4)\n",
    "    feature.append(lat_max)\n",
    "    feature.append(lat_min)\n",
    "    feature.append(lat_median)\n",
    "    feature.append(lat_mean)\n",
    "    #\n",
    "    feature.append(lon_1_4)\n",
    "    feature.append(lon_3_4)\n",
    "    feature.append(lon_max)\n",
    "    feature.append(lon_min)\n",
    "    feature.append(lon_median)\n",
    "    feature.append(lon_mean)\n",
    "    #\n",
    "    feature.append(speed_1_4)\n",
    "    feature.append(speed_3_4)\n",
    "    feature.append(speed_max)\n",
    "    feature.append(speed_median)\n",
    "    feature.append(speed_mean)\n",
    "    #\n",
    "    feature.append(direction_1_4)\n",
    "    feature.append(direction_3_4)\n",
    "    feature.append(direction_max)\n",
    "    feature.append(direction_min)\n",
    "    feature.append(direction_median)\n",
    "    feature.append(direction_mean)\n",
    "    #\n",
    "    feature.append(sx)\n",
    "    feature.append(sy)\n",
    "    feature.append(ex)\n",
    "    feature.append(ey)\n",
    "    feature.append(dis)\n",
    "    feature.append(lon_dis)\n",
    "    feature.append(lat_dis)\n",
    "    feature.append(cal_speed)\n",
    "    feature.append(dis_sqrt)\n",
    "    #feature.append(cnt_turn)\n",
    "    feature.append(year)\n",
    "    feature.append(month)\n",
    "    feature.append(abs(dir_k))\n",
    "    feature.append(vesselMMSI)\n",
    "    feature.append(carrierName)\n",
    "    feature.append(stopTime)\n",
    "    feature.append(cal_dis)\n",
    "    feature.append(label)\n",
    "    feature.append(label)\n",
    "    \n",
    "    return feature\n",
    "#\n",
    "import random\n",
    "from geopy.distance import geodesic\n",
    "import time\n",
    "def make_test_data(df):\n",
    "    features=[]\n",
    "    grouped=df.groupby('loadingOrder',sort=False)\n",
    "    print('finished1...')\n",
    "    #\n",
    "    start_time=time.time()\n",
    "    print('正在构造测试数据........')\n",
    "    start_time=time.time()\n",
    "    for name,group in grouped:\n",
    "        #\n",
    "        sample_trace=group.reset_index(drop=True)\n",
    "        features.append(get_test_feature(sample_trace,name))\n",
    "    print(\"构造测试数据所花费时间%.3fs\"%(time.time()-start_time))\n",
    "    return features\n",
    "#下面只需要保留原始数据cut之前的数据\n",
    "test_features=make_test_data(df_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "59157367"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(gpsdf)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "train=DataFrame(train_features)\n",
    "train.columns=['k_1_4','k_3_4','k_median','anchor_cnt','anchor_ratio','lat_1_4','lat_3_4','lat_max','lat_min'\n",
    "    ,'lat_median','lat_mean','lon_1_4','lon_3_4','lon_max','lon_min','lon_median','lon_mean'\n",
    "    'speed_1_4','speed_3_4','speed_min','speed_max','speed_median','speed_mean','direction_1_4','direction_3_4','direction_max'\n",
    "    ,'direction_min','direction_median','direction_mean','sx','sy','ex','ey'\n",
    "    ,'dis','lon_dis','lat_dis','cal_speed','dis_sqrt','year','month',\n",
    "    'dir_k','vesselMMSI','carrierName','stopTime','cal_dis','cut_label','label']\n",
    "train=train[train['label']>0.02*24]#筛选训练样本，0.05天以内的不予考虑\n",
    "train=train[train['label']<80*24]\n",
    "train.shape\n",
    "test=DataFrame(test_features)\n",
    "test.columns=['loadingOrder','k_1_4','k_3_4','k_median','anchor_cnt','anchor_ratio','lat_1_4','lat_3_4','lat_max','lat_min'\n",
    "    ,'lat_median','lat_mean','lon_1_4','lon_3_4','lon_max','lon_min','lon_median','lon_mean'\n",
    "    'speed_1_4','speed_3_4','speed_min','speed_max','speed_median','speed_mean','direction_1_4','direction_3_4','direction_max'\n",
    "    ,'direction_min','direction_median','direction_mean','sx','sy','ex','ey'\n",
    "    ,'dis','lon_dis','lat_dis','cal_speed','dis_sqrt','year','month',\n",
    "    'dir_k','vesselMMSI','carrierName','stopTime','cal_dis','cut_label','label']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "最长时间:35.22454861111111 day\n",
      "最短时间:1.1242708333333333 day\n",
      "平均时间:9.22959747482012 day\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYsAAAEWCAYAAACXGLsWAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAev0lEQVR4nO3dfbxcVX3v8c+XyIVcBAUJGJJgkAZbQI0Scml9QrGS6wNBvGioleiljZcXVnzVtgbrA0hTqVWsXBUbFAn4gPGRCFiMUfR6i4SDBkJ4kCiRhKTJER8gXo0mfO8fe50ynsyZPQln5szJfN+v17xmz5q19v6dLc4ve+2115JtIiIiWtlrrAOIiIjel2QRERG1kiwiIqJWkkVERNRKsoiIiFpJFhERUSvJImIXSfqYpHfuZtsbJf1Fm3XXSXrxCN+dKGnD7sQQsTseN9YBRHSTpHXAX9j+xu7uw/b/Gr2IIsaHXFlENJCUf0BFNJFkEX1D0lXA4cBXJW2V9HeSpkuypLMk3Q98s9T9vKT/kPRL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HAC8qo12dfPnNJsuv1HjfZGR9iXgVQ1J73Dbdw1vXxZ5ej7wAHCVpDNrjh0xoiSLiGEk7QWcDjzD9nTb06lWS2vWFfXvVLMYA7yWalnLVu4Gpkv6g/L5dcC3R6h3hKQjy+fGY98A/FWZ2RVJzxrh73gKsMX2ZVQzwD67JraIESVZRD8Zfs/iohHqPR94wPYDDWXfAY4eNvUzwJupunpup/rhP7dVALZ/A7wB+LykoRlZPzZCvQXAdeUG908avr6QavnM2yXdUT43cyKwStIPqK6KPtQqtohWMutsRETUypVFRETUSrKIiIhaSRYREVErySIiImolWURERK0ki4iIqJVkERERtf4/m2NnkL+4pUAAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "\n",
    "train_label=np.array(train['label']/24)\n",
    "\n",
    "##观察下预测结果的分布\n",
    "name_cnt={}#{订单号：对应的事件记录条数}\n",
    "tmp=[]\n",
    "print(\"最长时间:%s day\"%(np.max(train_label)))\n",
    "print(\"最短时间:%s day\"%np.min(train_label))\n",
    "print(\"平均时间:%s day\"%np.mean(train_label))\n",
    "#画出分布直方图\n",
    "import pylab as plt \n",
    "bins = np.linspace(int(min(train_label)),int(max(train_label)),int(max(train_label)))\n",
    "plt.hist(train_label,bins)\n",
    "plt.xlabel('ETA of orders ')\n",
    "plt.ylabel('Number of orders')\n",
    "plt.title('train lables')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 观察下测试集中给了多少天的轨迹数据\n",
    "- 最长时间:16.88171296296296 day\n",
    "- 最短时间:0.046527777777777786 day\n",
    "- 平均时间:4.325498415081749 day"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "最长时间:16.88171296296296 day\n",
      "最短时间:0.0 day\n",
      "平均时间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Kz3dkmnl6Nu3l6OjPvbhnWvK/dZWT72N9Jz9ZTDDNwm6Y3jUPvBE2kk2ug+E2o6zohx8nvb+zZbIelg4AO2j2poewXFL0gHSdrW9lMjONc84G7bi4bdsnk9W9p+djT7lvtPaRhELmLM0lOIgP8OfA24FpjfbANJL5O0vBzrf7mkWZL2BT4DvKXsdWw9YJ95ZQ/ijnI8/BeV7fdL+pikHwPHqZjf4+5y+diG/bct97u5PM6Csv2dkr4h6TvAtZKmSbqhrOHO8eixRPdKKMRktPWAy0dvH2b7twOXAZcAxw+yzXnAV8ux/i8GPm/7doqB0i6zva/t3/dvrGJinQuBt9t+FUWv/F0Nx/uD7TdQDFXwJeBo4I1A45g6Z1IMK7I/cAjw2YaRYF9L8QbroRShdk3ZO3o1cPswf96IQSUUYjL6fflDuv/rssE2LIcb7rP9S4oJZ/ZT85nIXgv8a/n5a8AbhqlhT4qB8X5RLl9EMf9Dv/6aXl5ut6YcoqBxsMH/Apwu6XbgOmArYFa5bpnt/vH1bwZOkvS3wKvK+TgiRiWhEN3ueODl5QiY/w5sD7y1hf2GGx9muCGMG+9bDHYsAW9tCLdZtvsH16v2LydgOQh4CPiapP8xzLkjBpVQiK4laQvgOIrpDPtHwVxA80tIP+FP02qeAPx4mMPfDcyW9Ofl8juA6wfZbo6k3cvlxnNfA5zaP0a+pNcM8ud4GcWcF1+iGGl3IgwhHpuphEJMRgPvKQw2CuhBFDNqPdTQdgOwV/98Aw3eQ3GJ5ucUP+BPG6oA238ATgK+IekOirHunzfqZ7ndYuDq8kbzLxtWfxJ4AfDzciTMTw5yuoOB2yXdRtHLOXeo2iKGklFSIyKikp5CRERUEgoREVFJKERERCWhEBERlYRCRERUEgoREVFJKEREROX/A97JR2da08VtAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "#观察下测试集中给了多少天的轨迹数据\n",
    "test_label=np.array(test['label']/24)\n",
    "##观察下预测结果的分布\n",
    "name_cnt={}#{订单号：对应的事件记录条数}\n",
    "tmp=[]\n",
    "print(\"最长时间:%s day\"%(np.max(test_label)))\n",
    "print(\"最短时间:%s day\"%np.min(test_label))\n",
    "print(\"平均时间:%s day\"%np.mean(test_label))\n",
    "#画出分布直方图\n",
    "import pylab as plt \n",
    "bins = np.linspace(int(min(test_label)),int(max(test_label)),int(max(test_label)))\n",
    "plt.hist(test_label,bins)\n",
    "plt.xlabel('ETA of orders ')\n",
    "plt.ylabel('Number of orders')\n",
    "plt.title('test lables')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 搭建训练模型"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## xgb+lgb"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "import xgboost as xgb\n",
    "import lightgbm as lgb\n",
    "from sklearn.ensemble import RandomForestRegressor\n",
    "from sklearn.model_selection import StratifiedKFold\n",
    "from sklearn.model_selection import train_test_split\n",
    "import pandas as pd\n",
    "from tqdm import tqdm\n",
    "import numpy as np\n",
    "from sklearn import linear_model\n",
    "from sklearn.model_selection import GridSearchCV\n",
    "from sklearn.metrics import mean_squared_error,explained_variance_score\n",
    "from sklearn.model_selection import KFold\n",
    "from matplotlib import pyplot as plt\n",
    "#from featexp import get_univariate_plots#用于特征筛选，需要先安装featexp\n",
    "%matplotlib inline\n",
    "import warnings\n",
    "warnings.filterwarnings('ignore')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "#把承运商的名称映射到数值类型\n",
    "#测试集中出现了149条船，里面有63条没有在训练集里面出现\n",
    "obj_f=pd.concat((train['vesselMMSI'],test['vesselMMSI'])).reset_index(drop=False)#.unique\n",
    "class_map={label:idx for idx,label in enumerate(obj_f['vesselMMSI'].unique())}\n",
    "train['vesselMMSI']=train['vesselMMSI'].map(class_map)\n",
    "test['vesselMMSI']=test['vesselMMSI'].map(class_map)\n",
    "#\n",
    "#把承运商的名称映射到数值类型\n",
    "#测试集中出现了149条船，里面有63条没有在训练集里面出现\n",
    "obj_f=pd.concat((train['carrierName'],test['carrierName'])).reset_index(drop=False)#.unique\n",
    "class_map={label:idx for idx,label in enumerate(obj_f['carrierName'].unique())}\n",
    "train['carrierName']=train['carrierName'].map(class_map)\n",
    "test['carrierName']=test['carrierName'].map(class_map)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>k_1_4</th>\n",
       "      <th>k_3_4</th>\n",
       "      <th>k_median</th>\n",
       "      <th>anchor_cnt</th>\n",
       "      <th>anchor_ratio</th>\n",
       "      <th>lat_1_4</th>\n",
       "      <th>lat_3_4</th>\n",
       "      <th>lat_max</th>\n",
       "      <th>lat_min</th>\n",
       "      <th>lat_median</th>\n",
       "      <th>...</th>\n",
       "      <th>dis_sqrt</th>\n",
       "      <th>year</th>\n",
       "      <th>month</th>\n",
       "      <th>dir_k</th>\n",
       "      <th>vesselMMSI</th>\n",
       "      <th>carrierName</th>\n",
       "      <th>stopTime</th>\n",
       "      <th>cal_dis</th>\n",
       "      <th>cut_label</th>\n",
       "      <th>label</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-0.562500</td>\n",
       "      <td>0.052083</td>\n",
       "      <td>0.000</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>22.156250</td>\n",
       "      <td>22.175781</td>\n",
       "      <td>22.328125</td>\n",
       "      <td>22.046875</td>\n",
       "      <td>22.156250</td>\n",
       "      <td>...</td>\n",
       "      <td>218.899360</td>\n",
       "      <td>2019</td>\n",
       "      <td>1</td>\n",
       "      <td>0.014920</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>322.086846</td>\n",
       "      <td>9.486111</td>\n",
       "      <td>601.755556</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>-0.250</td>\n",
       "      <td>3</td>\n",
       "      <td>0.032967</td>\n",
       "      <td>22.406250</td>\n",
       "      <td>22.437500</td>\n",
       "      <td>22.484375</td>\n",
       "      <td>22.406250</td>\n",
       "      <td>22.421875</td>\n",
       "      <td>...</td>\n",
       "      <td>224.338599</td>\n",
       "      <td>2019</td>\n",
       "      <td>1</td>\n",
       "      <td>0.015255</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>19.984359</td>\n",
       "      <td>6.930278</td>\n",
       "      <td>582.217222</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>-0.250</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>22.156250</td>\n",
       "      <td>22.265625</td>\n",
       "      <td>22.406250</td>\n",
       "      <td>22.046875</td>\n",
       "      <td>22.156250</td>\n",
       "      <td>...</td>\n",
       "      <td>218.838047</td>\n",
       "      <td>2019</td>\n",
       "      <td>1</td>\n",
       "      <td>0.015281</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>328.730033</td>\n",
       "      <td>9.970556</td>\n",
       "      <td>602.173611</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-inf</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>-0.625</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>22.156250</td>\n",
       "      <td>22.230469</td>\n",
       "      <td>22.546875</td>\n",
       "      <td>22.046875</td>\n",
       "      <td>22.156250</td>\n",
       "      <td>...</td>\n",
       "      <td>218.715257</td>\n",
       "      <td>2019</td>\n",
       "      <td>1</td>\n",
       "      <td>0.015933</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>216.805866</td>\n",
       "      <td>7.225556</td>\n",
       "      <td>603.028611</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0.121528</td>\n",
       "      <td>inf</td>\n",
       "      <td>inf</td>\n",
       "      <td>130</td>\n",
       "      <td>0.109060</td>\n",
       "      <td>22.484375</td>\n",
       "      <td>30.468750</td>\n",
       "      <td>30.500000</td>\n",
       "      <td>22.046875</td>\n",
       "      <td>24.265625</td>\n",
       "      <td>...</td>\n",
       "      <td>219.209113</td>\n",
       "      <td>2019</td>\n",
       "      <td>1</td>\n",
       "      <td>0.014043</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>1200.760383</td>\n",
       "      <td>133.703889</td>\n",
       "      <td>600.772222</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24383</th>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>22.296875</td>\n",
       "      <td>22.343750</td>\n",
       "      <td>22.359375</td>\n",
       "      <td>22.265625</td>\n",
       "      <td>22.343750</td>\n",
       "      <td>...</td>\n",
       "      <td>23.600595</td>\n",
       "      <td>2019</td>\n",
       "      <td>11</td>\n",
       "      <td>1.968841</td>\n",
       "      <td>38</td>\n",
       "      <td>4</td>\n",
       "      <td>0.0</td>\n",
       "      <td>15.515691</td>\n",
       "      <td>0.836389</td>\n",
       "      <td>144.657778</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24384</th>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>22.296875</td>\n",
       "      <td>22.343750</td>\n",
       "      <td>22.359375</td>\n",
       "      <td>22.265625</td>\n",
       "      <td>22.343750</td>\n",
       "      <td>...</td>\n",
       "      <td>23.575965</td>\n",
       "      <td>2019</td>\n",
       "      <td>11</td>\n",
       "      <td>2.025356</td>\n",
       "      <td>38</td>\n",
       "      <td>4</td>\n",
       "      <td>0.0</td>\n",
       "      <td>15.515691</td>\n",
       "      <td>0.836389</td>\n",
       "      <td>122.232778</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24385</th>\n",
       "      <td>-inf</td>\n",
       "      <td>-inf</td>\n",
       "      <td>-inf</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>22.109375</td>\n",
       "      <td>22.218750</td>\n",
       "      <td>22.250000</td>\n",
       "      <td>22.093750</td>\n",
       "      <td>22.140625</td>\n",
       "      <td>...</td>\n",
       "      <td>23.574117</td>\n",
       "      <td>2019</td>\n",
       "      <td>11</td>\n",
       "      <td>1.937410</td>\n",
       "      <td>38</td>\n",
       "      <td>4</td>\n",
       "      <td>0.0</td>\n",
       "      <td>25.948508</td>\n",
       "      <td>1.338333</td>\n",
       "      <td>143.756389</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24386</th>\n",
       "      <td>-inf</td>\n",
       "      <td>-inf</td>\n",
       "      <td>-inf</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>22.109375</td>\n",
       "      <td>22.218750</td>\n",
       "      <td>22.250000</td>\n",
       "      <td>22.093750</td>\n",
       "      <td>22.140625</td>\n",
       "      <td>...</td>\n",
       "      <td>23.547744</td>\n",
       "      <td>2019</td>\n",
       "      <td>11</td>\n",
       "      <td>1.992511</td>\n",
       "      <td>38</td>\n",
       "      <td>4</td>\n",
       "      <td>0.0</td>\n",
       "      <td>25.948508</td>\n",
       "      <td>1.338333</td>\n",
       "      <td>121.331389</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24387</th>\n",
       "      <td>-inf</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>-inf</td>\n",
       "      <td>2</td>\n",
       "      <td>0.014706</td>\n",
       "      <td>-20.140625</td>\n",
       "      <td>-20.125000</td>\n",
       "      <td>-19.968750</td>\n",
       "      <td>-20.140625</td>\n",
       "      <td>-20.140625</td>\n",
       "      <td>...</td>\n",
       "      <td>28.276420</td>\n",
       "      <td>2019</td>\n",
       "      <td>11</td>\n",
       "      <td>0.374041</td>\n",
       "      <td>38</td>\n",
       "      <td>4</td>\n",
       "      <td>0.0</td>\n",
       "      <td>19.027417</td>\n",
       "      <td>9.574444</td>\n",
       "      <td>259.757500</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>24388 rows × 46 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "          k_1_4     k_3_4  k_median  anchor_cnt  anchor_ratio    lat_1_4  \\\n",
       "0     -0.562500  0.052083     0.000           0      0.000000  22.156250   \n",
       "1           NaN       NaN    -0.250           3      0.032967  22.406250   \n",
       "2           NaN  0.000000    -0.250           0      0.000000  22.156250   \n",
       "3          -inf  0.000000    -0.625           0      0.000000  22.156250   \n",
       "4      0.121528       inf       inf         130      0.109060  22.484375   \n",
       "...         ...       ...       ...         ...           ...        ...   \n",
       "24383       NaN  0.000000       NaN           0      0.000000  22.296875   \n",
       "24384       NaN  0.000000       NaN           0      0.000000  22.296875   \n",
       "24385      -inf      -inf      -inf           0      0.000000  22.109375   \n",
       "24386      -inf      -inf      -inf           0      0.000000  22.109375   \n",
       "24387      -inf  0.000000      -inf           2      0.014706 -20.140625   \n",
       "\n",
       "         lat_3_4    lat_max    lat_min  lat_median  ...    dis_sqrt  year  \\\n",
       "0      22.175781  22.328125  22.046875   22.156250  ...  218.899360  2019   \n",
       "1      22.437500  22.484375  22.406250   22.421875  ...  224.338599  2019   \n",
       "2      22.265625  22.406250  22.046875   22.156250  ...  218.838047  2019   \n",
       "3      22.230469  22.546875  22.046875   22.156250  ...  218.715257  2019   \n",
       "4      30.468750  30.500000  22.046875   24.265625  ...  219.209113  2019   \n",
       "...          ...        ...        ...         ...  ...         ...   ...   \n",
       "24383  22.343750  22.359375  22.265625   22.343750  ...   23.600595  2019   \n",
       "24384  22.343750  22.359375  22.265625   22.343750  ...   23.575965  2019   \n",
       "24385  22.218750  22.250000  22.093750   22.140625  ...   23.574117  2019   \n",
       "24386  22.218750  22.250000  22.093750   22.140625  ...   23.547744  2019   \n",
       "24387 -20.125000 -19.968750 -20.140625  -20.140625  ...   28.276420  2019   \n",
       "\n",
       "       month     dir_k  vesselMMSI  carrierName  stopTime      cal_dis  \\\n",
       "0          1  0.014920           0            0       0.0   322.086846   \n",
       "1          1  0.015255           0            0       0.0    19.984359   \n",
       "2          1  0.015281           0            0       0.0   328.730033   \n",
       "3          1  0.015933           0            0       0.0   216.805866   \n",
       "4          1  0.014043           0            0       0.0  1200.760383   \n",
       "...      ...       ...         ...          ...       ...          ...   \n",
       "24383     11  1.968841          38            4       0.0    15.515691   \n",
       "24384     11  2.025356          38            4       0.0    15.515691   \n",
       "24385     11  1.937410          38            4       0.0    25.948508   \n",
       "24386     11  1.992511          38            4       0.0    25.948508   \n",
       "24387     11  0.374041          38            4       0.0    19.027417   \n",
       "\n",
       "        cut_label       label  \n",
       "0        9.486111  601.755556  \n",
       "1        6.930278  582.217222  \n",
       "2        9.970556  602.173611  \n",
       "3        7.225556  603.028611  \n",
       "4      133.703889  600.772222  \n",
       "...           ...         ...  \n",
       "24383    0.836389  144.657778  \n",
       "24384    0.836389  122.232778  \n",
       "24385    1.338333  143.756389  \n",
       "24386    1.338333  121.331389  \n",
       "24387    9.574444  259.757500  \n",
       "\n",
       "[24388 rows x 46 columns]"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#trainb1=pd.read_csv('8745train.csv')\n",
    "#train=pd.concat((train,trainb1)).reset_index(drop=True)\n",
    "train"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [],
   "source": [
    "#train.to_csv('15643train.csv',index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((24388, 38), (239, 38))"
      ]
     },
     "execution_count": 73,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "#\n",
    "features =['k_1_4','k_3_4','k_median','anchor_ratio','lat_1_4','lat_3_4','lat_max','lat_min'\n",
    "    ,'lat_median','lat_mean','lon_1_4','lon_3_4','lon_max','lon_min','lon_median','lon_mean'\n",
    "    'speed_1_4','speed_3_4','speed_min','speed_max','speed_median','speed_mean','direction_1_4','direction_3_4','direction_max'\n",
    "    ,'direction_min','direction_median','direction_mean','sx','sy','ex','ey'\n",
    "    ,'dis','lon_dis','lat_dis','cal_speed','month','dir_k','carrierName']\n",
    "train_data=train[features]\n",
    "test_data=test[features]\n",
    "y=train['label']\n",
    "train_data.shape,test_data.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((24388, 30), (239, 30))"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "features=['sx',  'sy', 'anchor_ratio',\n",
    "       'lat_mean', 'lat_3_4','lat_max','speed_median', 'k_median',\n",
    "       'lat_1_4', 'speed_3_4', 'lat_min', 'speed_max', 'carrierName', 'speed_mean', 'direction_mean',\n",
    "       'month', 'lon_dis', 'direction_1_4', 'lat_dis', 'dis',\n",
    "       'direction_min', 'direction_3_4', 'direction_median', 'cal_speed',\n",
    "       'dir_k', 'direction_max', 'ex', 'ey','cal_dis','cut_label',]\n",
    "train_data=train[features]\n",
    "test_data=test[features]\n",
    "y=train['label']\n",
    "train_data.shape,test_data.shape\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "metadata": {},
   "outputs": [],
   "source": [
    "x_train,x_test,y_train,y_test=train_test_split(train_data,y,test_size=0.1,random_state=2020)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "((21949, 38), (2439, 38))"
      ]
     },
     "execution_count": 75,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_train.shape,x_test.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "val_mse: 1.722459e+02\n",
      "train_mse: 2.024195e+01\n"
     ]
    }
   ],
   "source": [
    "llf= lgb.LGBMRegressor(objective='regression',\n",
    "                        num_leaves=21,\n",
    "                        learning_rate=0.05,\n",
    "                        n_estimators=3000,\n",
    "                        random_state=2020)\n",
    "\n",
    "llf.fit(x_train,y_train)\n",
    "\n",
    "llf_val_mse=mean_squared_error(y_test,llf.predict(x_test))\n",
    "llf_train_mse=mean_squared_error(y_train,llf.predict(x_train))\n",
    "print('val_mse:','{:e}'.format(llf_val_mse))\n",
    "print('train_mse:','{:e}'.format(llf_train_mse))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "第1次验证mse误差为183.469001\n",
      "第2次验证mse误差为145.732643\n",
      "第3次验证mse误差为194.329470\n",
      "第4次验证mse误差为246.482778\n",
      "第5次验证mse误差为169.051187\n",
      "平均验证误差187.813016\n"
     ]
    }
   ],
   "source": [
    "details=[]\n",
    "answers=np.zeros(len(test))\n",
    "n_splits=5\n",
    "cnt=0\n",
    "mean_error=0\n",
    "sk=KFold(n_splits=n_splits,shuffle=True,random_state=2020)\n",
    "for train_k,test_k in sk.split(train_data,y):\n",
    "    cnt+=1\n",
    "    x_train=train_data.iloc[train_k]\n",
    "    y_train=y.iloc[train_k]\n",
    "    x_test=train_data.iloc[test_k]\n",
    "    y_test=y.iloc[test_k]\n",
    "    llf.fit(x_train,y_train)\n",
    "    error=mean_squared_error(y_test,llf.predict(x_test))\n",
    "    print(\"第%d次验证mse误差为%f\" %(cnt,error))\n",
    "    mean_error+=error/n_splits\n",
    "    test_lgb=llf.predict(test_data)\n",
    "    answers+=test_lgb/n_splits\n",
    "print(\"平均验证误差%f\"%mean_error)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 观察训练/验证过程"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 观察预测结果的分布"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "预测的最长时间:34.192031224648474 day\n",
      "预测的最短时间:1.6187471319076578 day\n",
      "预测的平均时间:12.44649907964705 day\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEGCAYAAACNaZVuAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAU/UlEQVR4nO3dfbAldX3n8fcHJCuLGEEuZKKMV1liQvkwsCNrgiE8qIWyguCCYVMuoawda0uyWHG3nDVZhVBbwSSQ1TLlZiiIE1cR1KAIJEgmAusmBQw4PAUU4o6uODszxiQ8lJoFvvvH6btcr/fc23Nn+jxMv19Vt87p3+k+/Z2uuZ/b53d+/etUFZKkftln3AVIkkbP8JekHjL8JamHDH9J6iHDX5J66DnjLqCNQw45pGZnZ8ddhiRNlbvuuuu7VTWz2GtTEf6zs7Ns3rx53GVI0lRJ8s1hr9ntI0k9ZPhLUg8Z/pLUQ4a/JPWQ4S9JPWT4S1IPGf6S1EOGvyT1kOEvST00FVf4TpPZ9Tcsu87WS04dQSWSNJxn/pLUQ4a/JPWQ4S9JPWT4S1IPGf6S1EOO9hkDRwRJGjfP/CWphwx/Seohw1+Sesjwl6QeMvwlqYcMf0nqIcNfknrI8JekHuos/JM8N8kdSe5J8kCSi5r2g5PcnOTh5vGgrmqQJC2uyzP/HwInVdWrgTXAKUleC6wHNlXVkcCmZlmSNEKdhX8NPNEs7tf8FHA6sLFp3wi8tasaJEmL67TPP8m+SbYAO4Cbq+p24LCq2gbQPB7aZQ2SpB/XafhX1dNVtQZ4MXBskle03TbJuiSbk2zeuXNnd0VKUg+NZLRPVf09cAtwCrA9ySqA5nHHkG02VNXaqlo7MzMzijIlqTe6HO0zk+QFzfP9gdcDDwHXAec2q50LfKGrGiRJi+tyPv9VwMYk+zL4I3NNVV2f5K+Aa5K8E/gWcFaHNUiSFtF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figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "##观察下预测结果的分布\n",
    "re_day=answers/24\n",
    "name_cnt={}#{订单号：对应的事件记录条数}\n",
    "tmp=[]\n",
    "print(\"预测的最长时间:%s day\"%(np.max(re_day)))\n",
    "print(\"预测的最短时间:%s day\"%np.min(re_day))\n",
    "print(\"预测的平均时间:%s day\"%np.mean(re_day))\n",
    "#画出分布直方图\n",
    "import pylab as plt \n",
    "bins = np.linspace(int(min(re_day)),int(max(re_day)),int(max(re_day)))\n",
    "plt.hist(re_day,bins)\n",
    "plt.xlabel('ETA of orders ')\n",
    "plt.ylabel('Number of orders')\n",
    "plt.show()\n",
    "plt.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "预测的最长时间:35.13816358024692 day\n",
      "预测的最短时间:1.3967475229318103 day\n",
      "预测的平均时间:12.274253502963509 day\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEGCAYAAABiq/5QAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAATuUlEQVR4nO3df7BndV3H8eeLHwWRJshCW7peNfrBqKGt9kMjhGxIEhQDpV8b47RNo4bTLzcrjZim7YdOOjrVmuZqhuBPECyk1cWsBlh+Q6CQraZu7KYVwqgFvPvjnCtfL/d+79nde773+93zfMzc+X7P557zPe97YF/3cz/nnM9JVSFJGo6DVrsASdJkGfySNDAGvyQNjMEvSQNj8EvSwByy2gV0cfTRR9fc3NxqlyFJM+W66677z6pas7B9JoJ/bm6OHTt2rHYZkjRTknx6sXaHeiRpYAx+SRoYg1+SBsbgl6SB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8kjQwBr8kDcz/A0H5/M0KkxQrAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "##观察下ans6k结果的分布\n",
    "ansb_8_9dw=np.load('../submit/b_8_9dw.npy')\n",
    "re_day=ansb_8_9dw/24\n",
    "name_cnt={}#{订单号：对应的事件记录条数}\n",
    "tmp=[]\n",
    "print(\"预测的最长时间:%s day\"%(np.max(re_day)))\n",
    "print(\"预测的最短时间:%s day\"%np.min(re_day))\n",
    "print(\"预测的平均时间:%s day\"%np.mean(re_day))\n",
    "#画出分布直方图\n",
    "import pylab as plt \n",
    "bins = np.linspace(int(min(re_day)),int(max(re_day)),int(max(re_day)))\n",
    "plt.hist(re_day,bins)\n",
    "plt.xlabel('ETA of orders ')\n",
    "plt.ylabel('Number of orders')\n",
    "plt.show()\n",
    "plt.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "answer与ansb_8_9dw的mse:504,加权mse:579\n",
      "answer与ans_1075的mse:251,加权mse:438\n",
      "answer与ansqyl_mse1100的mse:788,加权mse:1159\n",
      "answers与ansb_rxd1421的mse:1136,加权mse:1071\n",
      "answers与ansb_rxd1471的mse:1036,加权mse:973\n"
     ]
    }
   ],
   "source": [
    "#\n",
    "def weight_mse(data1,data2):\n",
    "    weights=cut_df['cut_point'].values\n",
    "    weights=weights/np.sum(weights)\n",
    "    mse=0\n",
    "    for i in range(len(data1)):\n",
    "        mse+=weights[i]*(data1[i]-data2[i])**2\n",
    "    return mse\n",
    "final_ronghe_b=np.load('../submit/final_ronghe_b_fusai.npy')\n",
    "ansqyl_mse1100=np.load('../submit/qyl_mse1100.npy')\n",
    "ans_1075=np.load('../submit/best1075.npy')\n",
    "ansb_rxd1421=np.load('../submit/pre_rxd_zw_mse1421.npy')\n",
    "ansb_rxd1471=np.load('../submit/pre_rxd_zw_mse1471.npy')\n",
    "print(\"answer与ansb_8_9dw的mse:%.0f,加权mse:%.0f\"%(mean_squared_error(answers,final_ronghe_b),weight_mse(answers,final_ronghe_b)))\n",
    "print(\"answer与ans_1075的mse:%.0f,加权mse:%.0f\"%(mean_squared_error(final_ronghe_b,ans_1075),weight_mse(final_ronghe_b,ans_1075)))\n",
    "print(\"answer与ansqyl_mse1100的mse:%.0f,加权mse:%.0f\"%(mean_squared_error(answers,ansqyl_mse1100),weight_mse(answers,ansqyl_mse1100)))\n",
    "print(\"answers与ansb_rxd1421的mse:%.0f,加权mse:%.0f\"%(mean_squared_error(answers,ansb_rxd1421),weight_mse(answers,ansb_rxd1421)))\n",
    "print(\"answers与ansb_rxd1471的mse:%.0f,加权mse:%.0f\"%(mean_squared_error(answers,ansb_rxd1471),weight_mse(answers,ansb_rxd1471)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ronghe与ansb_8_9dw的mse:182,加权mse:171\n",
      "answers与ronghe的mse:537,加权mse:662\n",
      "answers与ansb_rxd1471的mse:1047,加权mse:1007\n"
     ]
    }
   ],
   "source": [
    "ronghe=np.load('../submit/ronghe_1_fusai_b.npy')\n",
    "print(\"ronghe与ansb_8_9dw的mse:%.0f,加权mse:%.0f\"%(mean_squared_error(ronghe,ansb_8_9dw),weight_mse(ronghe,ansb_8_9dw)))\n",
    "print(\"answers与ronghe的mse:%.0f,加权mse:%.0f\"%(mean_squared_error(answers,ronghe),weight_mse(answers,ronghe)))\n",
    "print(\"answers与ansb_rxd1471的mse:%.0f,加权mse:%.0f\"%(mean_squared_error(answers,ansb_rxd1471),weight_mse(answers,ansb_rxd1471)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "SZ109188860665 1.0\n",
    "NH240192470616 3.0\n",
    "JB123387157454 3.0\n",
    "ZO975754571124 3.0\n",
    "DH829189593918 105.0\n",
    "86 105.0\n",
    "LE381377964668 68.0\n",
    "95 68.0\n",
    "ZX552539758501 1.0\n",
    "TB846768731403 4.0\n",
    "HQ193237808500 1.0\n",
    "QK696918637480 8.0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(803.285666235279, 843.315925925926)"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "answers[177],ansb_8_9dw[177]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(803.285666235279, 843.315925925926)"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "answers[177],ansb_8_9dw[177]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "111.19881108436431 8\n",
      "154.82015668768602 60\n"
     ]
    }
   ],
   "source": [
    "tmp=abs(answers-ans_1075)\n",
    "for i in range(len(tmp)):\n",
    "    if tmp[i]>100:\n",
    "        print(tmp[i],i)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(408.6223052375692, 285.57, 371.89444444444445, 475.90444444444444)"
      ]
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "answers[5],ansb_8_9dw[5],ansb_rxd1421[5],ansb_rxd1471[5]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(155.5038225966607, 197.51916666666665, 86.61861111111111, 114.9325)"
      ]
     },
     "execution_count": 64,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "answers[110],ansb_8_9dw[110],ansb_rxd1421[110],ansb_rxd1471[110]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "FQ684650477699\n",
      "WG447072368140\n",
      "TG217980286566\n",
      "UU855384397170\n",
      "GN475000708758\n",
      "MF280195890024\n",
      "PP362007425226\n",
      "SX487073652239\n",
      "CW302926509424\n"
     ]
    }
   ],
   "source": [
    "def get_name(ids):\n",
    "    grouped=df_test.groupby('loadingOrder',sort=False)\n",
    "    cnt=0\n",
    "    for name,group in grouped:\n",
    "        if cnt==ids:\n",
    "            print(name)\n",
    "        cnt+=1\n",
    "def get_max_mse(data1,data2,data3,data4):\n",
    "    var_list=[]\n",
    "    for i in range(len(data1)):\n",
    "        a=np.array([data1[i],data2[i],data3[i],data4[i]])\n",
    "        var_list.append(a.var())\n",
    "        if a.var()>2000:\n",
    "            get_name(i)\n",
    "        #print(a.var())\n",
    "    return var_list\n",
    "var_list=get_max_mse(answers,ansb_8_9dw,ansb_rxd1421,ansb_rxd1471)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 134,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "GN475000708758\n"
     ]
    }
   ],
   "source": [
    "grouped=df_test.groupby('loadingOrder',sort=False)\n",
    "cnt=0\n",
    "for name,group in grouped:\n",
    "    if cnt==60:\n",
    "        print(name)\n",
    "    cnt+=1"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "GN475000708758\n",
    "IE114789474106"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 特征重要度筛选"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Figure size 1296x648 with 0 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAcgAAAEXCAYAAAApydQQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nOydeXhURfa/3wNhC/suEiWsAmGJbKIoBDUI7goDOqgsMqP+RNERkBHRuCCggPplkxkFFB0ERVlmEEUloCiLKCKrIIRdWWQLWwic3x9V3ek03UknZGuo93n6yb1161ade2lSqarzOUdUFYfD4XA4HOkplN8GOBwOh8NREHEDpMPhcDgcAXADpMPhcDgcAXADpMPhcDgcAXADpMPhcDgcAXADpMPhcDgcAXADpKNAICJTROS//sdZuD9JRPrntm3hjojcISKbRCRVRKbktz25gYj0FJHk/LbDEf64AdJREOkH3JfTjYqIikiXnG43zHgbmAnUwLzn80ZEou27bZET7eUA04Fa+W1ERohIooiMzW87HBkTkd8GOBz+qOrh/LbhQkREygGVgM9VdVd+2xMIESmqqinn04aqngBO5JBJOYqIRABn8tsOR2i4GaSjwOG/pCkiJUXkPRFJFpE/ROSfIvLfAEuExUVkoogcEZGdIjLAp40ke/iRne0k+Vz7p2032fbzvO91n3rP+tSbLCIlfK4lisgEERklIn+KyD4R6ScixURknIgcEpHtInJ/zrylrCEiccBBe/q1fQdx9to1IrJIRI6LyC77HGV87u0oIt+IyEH7bJ+LSAOf5rfanytsu4n2vnOWpkUkQUTW+JxPsf+WT4vITmCnLa8uIh/aPg+KyP9EpG6Iz5puidXTp4j0sEvxnn+/oiLy/0Rkh4gcEJHRIlLI574ke+/79p7f/ZfxReRyEflURI7azyciEhWg754i8htwCvgIaAc8at+X2ll4YRF5R0S2isgJuxQ+0M8mz/vqZ/+tDtpnifSpIyLylL3/lP2/MMzneobvVkQuE5HZ9t/6uIhsEJF7Qnn3FxpugH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XFrcTgC4UaQDofD4XAEwI0gHQ6Hw+EIgBtBOhwOh8MRANdBOhwOh8MRANdBOhwOh8MRANdBOhwOh8MRANdBOhwOh8MRgP8PooSnIGduuRkAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.figure(figsize=(18,9))\n",
    "lgb.plot_importance(llf,max_num_features=30)\n",
    "plt.title('lightgbm——feature_importances_',fontsize=14)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array(['sx', 'lon_min', 'lon_median', 'lon_1_4', 'sy', 'anchor_ratio',\n",
       "       'lat_mean', 'lat_median', 'lon_max', 'lon_3_4', 'lat_3_4', 'k_1_4',\n",
       "       'lat_max', 'lon_meanspeed_1_4', 'speed_median', 'k_median',\n",
       "       'lat_1_4', 'k_3_4', 'speed_3_4', 'lat_min', 'speed_min',\n",
       "       'speed_max', 'carrierName', 'speed_mean', 'direction_mean',\n",
       "       'month', 'lon_dis', 'direction_1_4', 'lat_dis', 'dis',\n",
       "       'direction_min', 'direction_3_4', 'direction_median', 'cal_speed',\n",
       "       'dir_k', 'direction_max', 'ex', 'ey'], dtype=object)"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "importance=pd.DataFrame({\n",
    "        'column': train_data.columns,\n",
    "        'importance': llf.booster_.feature_importance(),\n",
    "    }).sort_values(by='importance')\n",
    "importance=importance.reset_index(drop=True)\n",
    "importance['column'].values#[0:]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 生成提交文件"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "DH829189593918 105.0\n",
    "24 105.0\n",
    "LE381377964668 68.0\n",
    "87,68.0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {},
   "outputs": [],
   "source": [
    "test['label'] = answers\n",
    "result=test[['loadingOrder', 'label']]\n",
    "test_data_path = '../Btest0711_ALL.csv'\n",
    "test_data=pd.read_csv(test_data_path)\n",
    "test_data=get_data(test_data, mode='test')\n",
    "#\n",
    "test_data = test_data.merge(result, on='loadingOrder', how='left')\n",
    "test_data['ETA'] = (test_data['onboardDate'] + test_data['label'].apply(lambda x:pd.Timedelta(hours=x))).apply(lambda x:x.strftime('%Y/%m/%d  %H:%M:%S'))\n",
    "test_data.drop(['direction','TRANSPORT_TRACE'],axis=1,inplace=True)\n",
    "test_data['onboardDate'] = test_data['onboardDate'].apply(lambda x:x.strftime('%Y/%m/%d  %H:%M:%S'))\n",
    "test_data['creatDate'] = pd.datetime.now().strftime('%Y/%m/%d  %H:%M:%S')\n",
    "test_data['timestamp'] = test_data['temp_timestamp']\n",
    "# 整理columns顺序\n",
    "submit = test_data[['loadingOrder', 'timestamp', 'longitude', 'latitude', 'carrierName', 'vesselMMSI', 'onboardDate', 'ETA', 'creatDate']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>loadingOrder</th>\n",
       "      <th>timestamp</th>\n",
       "      <th>longitude</th>\n",
       "      <th>latitude</th>\n",
       "      <th>carrierName</th>\n",
       "      <th>vesselMMSI</th>\n",
       "      <th>onboardDate</th>\n",
       "      <th>ETA</th>\n",
       "      <th>creatDate</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>730</th>\n",
       "      <td>WG447072368140</td>\n",
       "      <td>2020-06-01T00:00:12.000Z</td>\n",
       "      <td>14.499490</td>\n",
       "      <td>-22.893365</td>\n",
       "      <td>RWHZVZ</td>\n",
       "      <td>V6234300528</td>\n",
       "      <td>2020/06/01  00:00:00</td>\n",
       "      <td>2020/06/18  00:37:20</td>\n",
       "      <td>2020/08/10  10:22:46</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>731</th>\n",
       "      <td>WG447072368140</td>\n",
       "      <td>2020-06-01T00:02:12.000Z</td>\n",
       "      <td>14.499735</td>\n",
       "      <td>-22.888367</td>\n",
       "      <td>RWHZVZ</td>\n",
       "      <td>V6234300528</td>\n",
       "      <td>2020/06/01  00:00:00</td>\n",
       "      <td>2020/06/18  00:37:20</td>\n",
       "      <td>2020/08/10  10:22:46</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>732</th>\n",
       "      <td>WG447072368140</td>\n",
       "      <td>2020-06-01T00:04:12.000Z</td>\n",
       "      <td>14.499978</td>\n",
       "      <td>-22.883375</td>\n",
       "      <td>RWHZVZ</td>\n",
       "      <td>V6234300528</td>\n",
       "      <td>2020/06/01  00:00:00</td>\n",
       "      <td>2020/06/18  00:37:20</td>\n",
       "      <td>2020/08/10  10:22:46</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>733</th>\n",
       "      <td>WG447072368140</td>\n",
       "      <td>2020-06-01T00:06:12.000Z</td>\n",
       "      <td>14.500322</td>\n",
       "      <td>-22.878165</td>\n",
       "      <td>RWHZVZ</td>\n",
       "      <td>V6234300528</td>\n",
       "      <td>2020/06/01  00:00:00</td>\n",
       "      <td>2020/06/18  00:37:20</td>\n",
       "      <td>2020/08/10  10:22:46</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>734</th>\n",
       "      <td>WG447072368140</td>\n",
       "      <td>2020-06-01T00:08:04.000Z</td>\n",
       "      <td>14.500562</td>\n",
       "      <td>-22.873402</td>\n",
       "      <td>RWHZVZ</td>\n",
       "      <td>V6234300528</td>\n",
       "      <td>2020/06/01  00:00:00</td>\n",
       "      <td>2020/06/18  00:37:20</td>\n",
       "      <td>2020/08/10  10:22:46</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1268</th>\n",
       "      <td>WG447072368140</td>\n",
       "      <td>2020-06-01T23:38:26.000Z</td>\n",
       "      <td>10.544117</td>\n",
       "      <td>-17.109868</td>\n",
       "      <td>RWHZVZ</td>\n",
       "      <td>V6234300528</td>\n",
       "      <td>2020/06/01  00:00:00</td>\n",
       "      <td>2020/06/18  00:37:20</td>\n",
       "      <td>2020/08/10  10:22:46</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1269</th>\n",
       "      <td>WG447072368140</td>\n",
       "      <td>2020-06-01T23:42:51.000Z</td>\n",
       "      <td>10.531592</td>\n",
       "      <td>-17.092637</td>\n",
       "      <td>RWHZVZ</td>\n",
       "      <td>V6234300528</td>\n",
       "      <td>2020/06/01  00:00:00</td>\n",
       "      <td>2020/06/18  00:37:20</td>\n",
       "      <td>2020/08/10  10:22:46</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1270</th>\n",
       "      <td>WG447072368140</td>\n",
       "      <td>2020-06-01T23:55:00.000Z</td>\n",
       "      <td>10.498785</td>\n",
       "      <td>-17.043038</td>\n",
       "      <td>RWHZVZ</td>\n",
       "      <td>V6234300528</td>\n",
       "      <td>2020/06/01  00:00:00</td>\n",
       "      <td>2020/06/18  00:37:20</td>\n",
       "      <td>2020/08/10  10:22:46</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1271</th>\n",
       "      <td>WG447072368140</td>\n",
       "      <td>2020-06-01T23:59:30.000Z</td>\n",
       "      <td>10.487412</td>\n",
       "      <td>-17.024637</td>\n",
       "      <td>RWHZVZ</td>\n",
       "      <td>V6234300528</td>\n",
       "      <td>2020/06/01  00:00:00</td>\n",
       "      <td>2020/06/18  00:37:20</td>\n",
       "      <td>2020/08/10  10:22:46</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1272</th>\n",
       "      <td>WG447072368140</td>\n",
       "      <td>2020-06-01T23:59:42.000Z</td>\n",
       "      <td>10.486833</td>\n",
       "      <td>-17.023773</td>\n",
       "      <td>RWHZVZ</td>\n",
       "      <td>V6234300528</td>\n",
       "      <td>2020/06/01  00:00:00</td>\n",
       "      <td>2020/06/18  00:37:20</td>\n",
       "      <td>2020/08/10  10:22:46</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>543 rows × 9 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        loadingOrder                 timestamp  longitude   latitude  \\\n",
       "730   WG447072368140  2020-06-01T00:00:12.000Z  14.499490 -22.893365   \n",
       "731   WG447072368140  2020-06-01T00:02:12.000Z  14.499735 -22.888367   \n",
       "732   WG447072368140  2020-06-01T00:04:12.000Z  14.499978 -22.883375   \n",
       "733   WG447072368140  2020-06-01T00:06:12.000Z  14.500322 -22.878165   \n",
       "734   WG447072368140  2020-06-01T00:08:04.000Z  14.500562 -22.873402   \n",
       "...              ...                       ...        ...        ...   \n",
       "1268  WG447072368140  2020-06-01T23:38:26.000Z  10.544117 -17.109868   \n",
       "1269  WG447072368140  2020-06-01T23:42:51.000Z  10.531592 -17.092637   \n",
       "1270  WG447072368140  2020-06-01T23:55:00.000Z  10.498785 -17.043038   \n",
       "1271  WG447072368140  2020-06-01T23:59:30.000Z  10.487412 -17.024637   \n",
       "1272  WG447072368140  2020-06-01T23:59:42.000Z  10.486833 -17.023773   \n",
       "\n",
       "     carrierName   vesselMMSI           onboardDate                   ETA  \\\n",
       "730       RWHZVZ  V6234300528  2020/06/01  00:00:00  2020/06/18  00:37:20   \n",
       "731       RWHZVZ  V6234300528  2020/06/01  00:00:00  2020/06/18  00:37:20   \n",
       "732       RWHZVZ  V6234300528  2020/06/01  00:00:00  2020/06/18  00:37:20   \n",
       "733       RWHZVZ  V6234300528  2020/06/01  00:00:00  2020/06/18  00:37:20   \n",
       "734       RWHZVZ  V6234300528  2020/06/01  00:00:00  2020/06/18  00:37:20   \n",
       "...          ...          ...                   ...                   ...   \n",
       "1268      RWHZVZ  V6234300528  2020/06/01  00:00:00  2020/06/18  00:37:20   \n",
       "1269      RWHZVZ  V6234300528  2020/06/01  00:00:00  2020/06/18  00:37:20   \n",
       "1270      RWHZVZ  V6234300528  2020/06/01  00:00:00  2020/06/18  00:37:20   \n",
       "1271      RWHZVZ  V6234300528  2020/06/01  00:00:00  2020/06/18  00:37:20   \n",
       "1272      RWHZVZ  V6234300528  2020/06/01  00:00:00  2020/06/18  00:37:20   \n",
       "\n",
       "                 creatDate  \n",
       "730   2020/08/10  10:22:46  \n",
       "731   2020/08/10  10:22:46  \n",
       "732   2020/08/10  10:22:46  \n",
       "733   2020/08/10  10:22:46  \n",
       "734   2020/08/10  10:22:46  \n",
       "...                    ...  \n",
       "1268  2020/08/10  10:22:46  \n",
       "1269  2020/08/10  10:22:46  \n",
       "1270  2020/08/10  10:22:46  \n",
       "1271  2020/08/10  10:22:46  \n",
       "1272  2020/08/10  10:22:46  \n",
       "\n",
       "[543 rows x 9 columns]"
      ]
     },
     "execution_count": 69,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "submit[submit['loadingOrder'].isin(['WG447072368140'])]#FA712454830300"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {},
   "outputs": [],
   "source": [
    "submit.to_csv('../submit/qyl_mse650.csv', index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "metadata": {},
   "outputs": [],
   "source": [
    "np.save('../submit/qyl_mse650.npy',answers)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "85.52517731231399"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "answers[60]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "huawei_copy",
   "language": "python",
   "name": "huawei_copy"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
